Melly has asked for the wisdom of the Perl Monks concerning the following question:
Hi Monkees
I ended up writing two regexes when I'm sure one would do - can anyone compress the following to a single regex?
($foo =~ /$users_regex/ and $foo !~ /,v$/)
$users_regex can be any valid regex. We can ignore the edge-case of the user's regex wanting to match .*,v$
|
|---|