it is easy to do with two regexes, such as: ...Easy, perhaps, but wrong. The suggested two regexes would match a string starting with an underscore.
Update (at 7:50 UTC): sorry, the last sentence below is wrong, I had missed the $ at the end of the first pattern.DB<1> $f = "_foo"; DB<2> print "Success" if $f =~ /^[\w\.]+$/ && $f =~ /^\w/; Success DB<3>
It would also accept garbage characters in the middle.
In reply to Re^2: Regex to detect file name
by Laurent_R
in thread Regex to detect file name
by lirc201
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |