"Everyone" <matt.slavicek gmail.com> wrote:
>I can't figure out why this regex:
>"[(thusmiannqa01)|(thusmiannsql13)] -
>[(agr)|(dm)|(emp)|(hp)|(mcd)|(ssc)]\w*"
A number of problems. The biggest one is that you're
putting groups in []
-- [] is for character classes not groups of text -- you
could put [a-z] to
match a-z but putting (thusmian etc. in there is causing it
to literally
look for the letters in that class in no particular order.
Try this one:
I've made most of the parenthetical capture groups
non-capturing with (?
-- so this match should include just 3 backreferences --
thusmiannqua02,
emp, and 30...etc.
((?:thusmiannqa01)|(?:thusmiannsql13)) -
((?:agr)|(?:dm)|(?:emp)|(?:hp)|(?:mcd)|(?:ssc))([\w]+)
--
Remember, no matter where you go, there you are. -Buckaroo
Banzai
Online Regex find/repalce utility: http://rereplace.com
Command-based online image editor: http://theprawn.com/imag
iine
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Regex" group.
To post to this group, send email to regex googlegroups.com
To unsubscribe from this group, send email to
regex-unsubscribe googlegroups.com
For more options, visit this group at http://groups.go
ogle.com/group/regex
-~----------~----~----~----~------~----~------~--~---
|