Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Problem with regex wildcard operator (.)...?

by BillKSmith (Monsignor)
on Sep 06, 2021 at 03:37 UTC ( #11136490=note: print w/replies, xml ) Need Help??


in reply to Problem with regex wildcard operator (.)...?

Your misunderstanding has nothing to do with the metacharacter '.', but rather with the quantifier '?'. When a character (or metacharacter) in your regex matches zero times, you will reach the end of the regex before you have matched all the characters in the string. Your 'end-of-string' anchor '$' fails.
Bill
  • Comment on Re: Problem with regex wildcard operator (.)...?

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (4)
As of 2021-11-27 21:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?