Example:
my $drivespec = qr{[a-zA-Z]:}; my $dir = qr{[^<>":|?*]*}; my $path = qr{^ $drivespec? $dir $}x; unless( $input->{$key} =~ $path ) { ... }
This barely scratches the surface, of course. More reading at perlrequick, perlretut, perlre, and here in the Tutorials section.
In reply to Re: Showing why a Regexp didn't match
by rhesa
in thread Showing why a Regexp didn't match
by cosmicperl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |