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

Re: Re: [perlre] 4-digit hex code in regexp? How to specify?

by jreades (Friar)
on Nov 14, 2002 at 21:43 UTC ( #213027=note: print w/replies, xml ) Need Help??

in reply to Re: [perlre] 4-digit hex code in regexp? How to specify?
in thread [perlre] 4-digit hex code in regexp? How to specify?

There appear to be two ways to handle hex codes -- one is the one that you are using:


The other is the method used by Mr. Muskrat:


If you're using 'wide' hex digits (as I assume is the case since you're talking about four digits in this example) then you probably need to use the \x{...} approach.

If you'll tell us a little more about what you're doing, we might be able to move beyond a single substitution. Unless that's all you need, in which case this appears to work:


And you don't need to make it part of a character class

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (9)
As of 2016-10-25 21:38 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (330 votes). Check out past polls.