[thelist] Regular Expression

Warden, Matt mwarden at mattwarden.com
Thu Mar 7 14:03:01 CST 2002


On Mar 7, dan donaldson had something to say about Re: [thelist] Regular...

>
>On Thursday, March 7, 2002, at 09:48  AM, Raymond Camden wrote:
>
>> Err, I don't know ASP, but isn't this a simple equivalence check?
>
>I don't know it either (PHP guy) but the question would also depend on if
>
>cAts
>CATs
>Cats
>
>etc. were valid matches. If so, it's not an equivalence check. In that
>case would
>
>/^[Cc][Aa][Tt][Ss]$/
>
>
>not be the way to go?

i think that's overly complex and is harder to understand (from a coder's
perspective) than just:

if lcase(foo) = "bar" then
	' foo is some case variation of "bar"
else
	' foo does not say "bar" in any way
end if

of course, this is the same as saying:

if ucase(foo) = "BAR" then
	...
end if

it's a preference thing. i like lowercase, because i think size doesn't
matter...

--
mattwarden
mattwarden.com




More information about the thelist mailing list