Claude makes a good point.  My original regex will catch "& i am a tall 
man;"

You could limit the length, as he does, or you could use
\&##?\w+;
Which is an ampersand, an optional hash mark (yes, Claude, you do have 
to escape it), one or more "word" bits (letters, numbers), and the 
trailing semicolon.

--Ben "regex from the darkness" Doom

Claude Schneegans wrote:
>  >>What would be the syntax to find all of the strings that look like: 
> ®, ™ (i.e. the format amprsand[any character(s)]semicolon) in 
> a string?
> 
> I would put a limit on the length of the string between & and ;, 
> otherwise you may end up with unwanted long strings.
> Try this : "&#?[a-zA-Z0-9]{1,8};"
> You may have to double the # if you are within CF code.
> 
> This will catch something like & or   or  , but not
> "... the Jo Blow & ass. company ;..."
> 


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
ColdFusion is delivering applications solutions at at top companies 
around the world in government.  Find out how and where now
http://www.adobe.com/cfusion/showcase/index.cfm?event=finder&productID=1522&loc=en_us

Archive: http://www.houseoffusion.com/groups/RegEx/message.cfm/messageid:1104
Subscription: http://www.houseoffusion.com/groups/RegEx/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.21

Reply via email to