Hi,

I have a dilemma, I am processing CGI forms and I need to come up with
a regex that will accept HTML entities (i.e., " or {), white
space, some other chars and text...  The regex I've come up with is
flawed:

m/^&#?\w{2,4};|[EMAIL PROTECTED],\(\)\/\[\]:;\?!]+$/g;

This will match and ampersand followed by an optional hash (I believe
that's a pound sign for the Americans? A # sign anyway), followed by
two to four word characters and a semi-colon (a HTML entity.) 
However, if an HTML entity is matched at the beginning of the string
nothing seems to be matched thereafter and if the allowed characters
within the character class are matched at the beginning it will not
match the entities....

I wonder if anyone can help with this (I'm sure most people on this
list are far more advanced with Perl than I am anyway).

Many thanks for any help anyone can offer,

KR

Chris

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to