Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^3: why doesnt my regex doesnt matches certain character?

by thundergnat (Deacon)
on May 11, 2005 at 10:51 UTC ( [id://455944]=note: print w/replies, xml ) Need Help??


in reply to Re^2: why doesnt my regex doesnt matches certain character?
in thread why doesnt my regex doesnt matches certain character?

Those are control characters of some type. That particular one is "Delete" - character \x7F. Assuming they are all the same, you can match against that. It might be better to match against a character class though, in case they vary.

Try:

$text =~ /\p{Control}/;

to match, or

$text =~ s/\p{Control}//g;

to remove.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (6)
As of 2024-04-19 08:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found