Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Re^6: Filtering unwanted chars from input field

by johngg (Abbot)
on Dec 19, 2012 at 23:18 UTC ( #1009658=note: print w/replies, xml ) Need Help??

in reply to Re^5: Filtering unwanted chars from input field
in thread Filtering unwanted chars from input field

The left hand side of the tr is not a regular expression. Just include a real space in the character list.

$ perl -E ' > @data = ( > q{Hello, world!}, > q{te-st%$/*.}, > q{All_of_this_is_OK.}, > q{!@#$%^&*()12345}, > ); > say for map { tr{A-Za-z0-9_. -}{}cd; $_ } @data;' Hello world te-st. All_of_this_is_OK. 12345 $



Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1009658]
[Corion]: Eily: Yeah - my French isn't even good to understand jokes, much less to make them :-D
[Corion]: marto: That post is a repost/duplicate of Excel sheet data write issue :-D
[Corion]: Whoops - Merging worksheets in .xls in one Excel sheet
[marto]: Corion, whoops, can the moderation me amended?
[Corion]: marto: We could vote, unconsider and reconsider ;)
[Corion]: "vote keep", I meant ;)
[Corion]: marto: But that aside, I hope you are well!
Corion is slowly acclimatizing to working only four days a week
[marto]: the back pain is still there, it's been a rough week, trying to do building work with a bad back
[Corion]: marto: Ow! That doesn't sound good :-/ The work won't help your back...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (8)
As of 2017-09-21 14:37 GMT
Find Nodes?
    Voting Booth?
    During the recent solar eclipse, I:

    Results (248 votes). Check out past polls.