Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^3: Filtering unwanted chars from input field

by Kenosis (Priest)
on Dec 17, 2012 at 21:10 UTC ( #1009232=note: print w/ replies, xml ) Need Help??


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

Thank you, johngg. Not sure why I complicated it. Yours is, indeed, a more elegant and readable solution (++). Was brought back to this node after the following should-have-done-this-in-the-first-place solution occurred to me:

$str =~ s/[^$acceptable]//gi;

Edited my original comment to reflect this...


Comment on Re^3: Filtering unwanted chars from input field
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (14)
As of 2015-07-31 20:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (282 votes), past polls