Dear Monks,
I've recently started to use Regexp::Common to write more readable regular expressions. In particular, I'm using the "delimited" feature set to identify path names. However, it seems using backslash "\" as a delimiter won't work. The code example below illustrates the problem.
I'm not sure whether the problem is with the way I'm using Regexp::Common, or whether I've uncovered a bug with the module. Any suggestions would be most appreciated.
use Regexp::Common qw[ delimited ]; my $P1 = '../matrix-ops/matopmul.mk'; my $P2 = 'C:\matrix-ops\matopmul.mk'; print "P1 has path\n" if ($P1 =~ /$RE{delimited}{-delim => '\/'}/ ); print "P2 has path\n" if ($P2 =~ /$RE{delimited}{-delim => '\/'}/ );
Cheers, Ron.
In reply to Delimiters in Regexp::Common by rongrw
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |