in reply to Re^3: RegEx - match pattern not followed by literal
in thread RegEx - match pattern not followed by literal

Regexps can do 'followed by' and 'or' easily, but not 'and'.

I just thought of another solution:

/$users_regex .*\z (?<!,v) (?<!,v\n)/xs

Or if you really meant /,v\z/:

/$users_regex .*\z (?<!,v)/xs

Replies are listed 'Best First'.
Re^5: RegEx - match pattern not followed by literal
by driver8 (Scribe) on Oct 13, 2006 at 07:00 UTC
    You guys are making this a little more complicated than it needs to be. I think that /(?!.*,v$)$users_regex/ will suffice. As has already been said, though, the OP's first solution is probably cleanest.