in reply to Re^3: Regex to detect file name
in thread Regex to detect file name
actually has a negative character class (leading ^), rather than a start-of-string anchor.if($view_tag =~ m/[^A-Za-z0-9_\-\.]/) {
So the OP had to negate the pattern.
My guess is that the OP really meant:
Update: fixed a typo: s/or-string/of-string/if($view_tag =~ m/^[A-Za-z0-9_\-\.]/) {
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Regex to detect file name
by AnomalousMonk (Archbishop) on Jul 06, 2018 at 01:14 UTC |