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
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 )
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
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.
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
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
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
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
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
(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®
10 matches
Mail list logo