Re: regex and options

2008-10-16 Thread Richard White
Out of curiosity, what makes you choose those titles as valid and no others? just our clients business logic, they want a drop down box with just those options, so it is just server side validation. ~| Adobe® ColdFusion® 8

Re: regex and options

2008-10-16 Thread Peter Boughton
just our clients business logic, they want a drop down box with just those options, so it is just server side validation. Heh. If it's a drop down, I wouldn't bother with a regex: ListFind( 'Dr,Prof,Mr,Mrs,Ms,Miss' , value )

Re: regex and options

2008-10-16 Thread Richard White
Heh. If it's a drop down, I wouldn't bother with a regex: ListFind( 'Dr,Prof,Mr,Mrs,Ms,Miss' , value ) hmmm, yes that would be a bit easier :) thanks peter ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic

Re: regex and options

2008-10-16 Thread Claude Schneegans
what makes Dr and Prof special, compared to the hundreds of other similar ones? According to the typographic code, there are rules about abreviations. For common words as Doctor, Mister, etc, there are may ways to abreviate them, but only one complies with rules and is considered as correct.

Re: regex and options

2008-10-16 Thread Claude Schneegans
Heh. If it's a drop down, I wouldn't bother with a regex: I wouldn't even bother with any verification at all. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial

Re: regex and options

2008-10-15 Thread Matt Quackenbush
Title: Dr,Prof,Mr,Mrs,Ms,Miss) cfelse cfreturn true /cfif /cffunction i have been looking at various regex tutorials about options, and also looked the the very useful regex tutorial site: http://www.regular-expressions.info/alternation.html but the problem i am having

Re: regex and options

2008-10-15 Thread Richard White
Thanks Matt, i didn't think to use the \A and \Z as this was where i was getting lost, i couldn't understand how to constrain it just to those options, but your example works perfectly and i have learned something new :) thanks again richard \b is an escape sequence that, as taken from the

regex and options

2008-10-15 Thread Richard White
cfreturn true /cfif /cffunction i have been looking at various regex tutorials about options, and also looked the the very useful regex tutorial site: http://www.regular-expressions.info/alternation.html but the problem i am having is that it will match any pattern including the pipe, so if i type

Re: regex and options

2008-10-15 Thread Sonny Savage
Cool, I wasn't aware of the \A \Z - I've always used ^ $ Like this: cfset var titleRegEx = ^(Dr|Prof|Mr|Mrs|Ms|Miss)(\.)?$ / Edward A Savage Jr - Sonny Senior Software Engineer Creditdiscovery, LLC I believe in getting into hot water; it keeps you clean. ~ GK Chesterton On Wed, Oct 15, 2008 at

Re: regex and options

2008-10-15 Thread Peter Boughton
(Valid Title: Dr,Prof,Mr,Mrs,Ms,Miss) Out of curiosity, what makes you choose those titles as valid and no others? Specifically, what makes Dr and Prof special, compared to the hundreds of other similar ones? ~| Adobe®