[thelist] CF: Regex Help

Frank lists at frankmarion.com
Thu Jul 17 18:02:37 CDT 2003


I'm having a hard time with CF's implementation of REGEX. Somehow they got 
it in their head that using a dot "." is a good choice for indication an 
end-of-line instead of "$" (at end of line) or "\r|\lf".

I want to correct a common typo, where someone enters "mydomain.co" instead 
of "mydomain.com". This bypasses "mydomain.co.uk".

Here is the expression:
    REReplaceNoCase(user_sub, "([\.a-zA-Z0-9_-]+)([^\.]{2})\.(co)[^m.]", 
"\1\2.\3m")')

Testing it though Studio, I get a match for

"mydomain.co
"
but none for  "mydomain.co".

Can any see what I'm missing?

--
Frank Marion     lists at frankmarion.com      Keep the signal high.  



More information about the thelist mailing list