
August 22nd, 2008, 01:29 PM
|
 |
garish grotesque gargoyle
|
|
Join Date: Mar 2006
Location: gracing gargantuan gothic gateways
|
|
Code:
/(yahoo\.com|[^@]*hotmail\.com)/
would be containing yahoo.com or hotmail.com but not @hotmail.com
would also match @yahoo.com
the | operator says 'or'; if you put the whole phrase in a match condition (the () operators) then it's one phrase or the other. the [^something] syntax says 'not any character in these []'. the * operator says '0 or more', so that if the string starts with hotmail.com it will still match.
try checking the other threads in the regex forum for some really helpful info about using regex in general, it will teach you a lot about the syntax and how to use it. good luck!
__________________
"Human history becomes more and more a race between education and catastrophe." (H.G. Wells)
"Giving me a new idea is like handing a cretin a loaded gun, but I do thank you anyhow, bang, bang." (Philip K. D!ck)
|