Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^3: Regular expression for hexadecimal number

by radiantmatrix (Parson)
on Jul 30, 2007 at 15:13 UTC ( [id://629591]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Regular expression for hexadecimal number
in thread Regular expression for hexadecimal number

What you describe is accomplished not by using a modifier, but by being explicit in the definition of the char class:

m/0x[\da-fA-F]{1,4}/;

There's no reason to have or use modifiers on only part of a regex, when one can simply use the mechanisms already available to accomplish the same goal.

<radiant.matrix>
Ramblings and references
The Code that can be seen is not the true Code
I haven't found a problem yet that can't be solved by a well-placed trebuchet

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (3)
As of 2024-03-30 07:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found