Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^2: Regex to detect file name

by Laurent_R (Canon)
on Jul 06, 2018 at 21:46 UTC ( [id://1218072]=note: print w/replies, xml ) Need Help??


in reply to Re: Regex to detect file name
in thread Regex to detect file name

# corrected if($view_tag =~ m/^[A-Za-z0-9][\w.-]*/) {
I think that you need to add an end-of-string anchor at the end of the pattern to prevent matching if there are some unwanted or spurious characters after the last character matching [\w.-].

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1218072]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (2)
As of 2024-04-26 03:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found