in reply to Regex AND NOT with zero-width negative lookahead assertion

You might want to take a look at Regexp::Common.

  • Comment on Re: Regex AND NOT with zero-width negative lookahead assertion

Replies are listed 'Best First'.
Re^2: Regex AND NOT with zero-width negative lookahead assertion
by cxw (Scribe) on Mar 28, 2020 at 00:24 UTC
    Specifically, this might serve -
    use Regexp::Common qw /delimited/; $str =~ /^$RE{delimited}{-delim=>'/'}$/;
    The $RE{delimited} regex accepts backslash escapes by default.