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

Re: Range of chars except one

by I0 (Priest)
on Jan 20, 2002 at 00:26 UTC ( [id://140124]=note: print w/replies, xml ) Need Help??


in reply to Range of chars except one

$text =~ s/[^\x20-\xff\x0a]//g;

Replies are listed 'Best First'.
Re: Re: Range of chars except one
by Juerd (Abbot) on Jan 20, 2002 at 01:06 UTC
    Not all data is ascii. Your piece of code will remove all unicode characters, which may or may not be what you want.

    2;0 juerd@ouranos:~$ perl -e'undef christmas' Segmentation fault 2;139 juerd@ouranos:~$

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (2)
As of 2024-04-25 20:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found