Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: regex question Underscores, lines and paratheses.

by AnomalousMonk (Archbishop)
on May 06, 2019 at 16:50 UTC ( [id://1233406]=note: print w/replies, xml ) Need Help??


in reply to regex question Underscores, lines and paratheses.

For handling  - (hyphen) characters in character classes, see Using character classes in perlrequick, which says in part:

The special character '-' acts as a range operator within character classes ...
If '-' is the first or last character in a character class, it is treated as an ordinary character.
(Note that if the class is negated as in  [^-...] the "first" character is the first one after the  ^ (tilde | caret (per hippo - thanks!)) class negation operator.)

See also a similar discussion in Using character classes in perlretut.

Update: And see also Bracketed Character Classes, Special Characters Inside a Bracketed Character Class and Character Ranges in perlrecharclass.


Give a man a fish:  <%-{-{-{-<

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2024-04-23 18:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found