The qr// m// s/// delimiters are (more or less) arbitrary. (Update: Please see Regexp Quote-Like Operators in perlop.)c:\@Work\Perl\monks>perl -wMstrict -le "my $s = 'this is the path/to/my/file what i want'; ;; my $rx_ptf = qr{ \w+ (?: / \w+)+ }xms; ;; print qq{matched: '$1'} if $s =~ m{ \b ($rx_ptf) \b }xms; " matched: 'path/to/my/file'
Give a man a fish: <%-{-{-{-<
In reply to Re^3: Regex with two strings from files
by AnomalousMonk
in thread Regex with two strings from files
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |