![]() |
|
XP is just a number | |
PerlMonks |
Re: Passing a variable to a regexby Athanasius (Archbishop) |
on Sep 17, 2015 at 11:17 UTC ( #1142311=note: print w/replies, xml ) | Need Help?? |
Hello mavericknik, I see choroba has answered your question, but I wanted to ask: what is [NOR|OR] supposed to do in the regex? It is actually a character class, which matches any one character from the list “N”, “O”, “R”, “|”:
Did you mean to write this: (?:NOR|OR)? If so, it can be shortened to: N?OR. Hope that helps,
In Section
Seekers of Perl Wisdom
|
|