TriggerDunpoe has asked for the wisdom of the Perl Monks concerning the following question:
I have
what's not right? it doesn't do anything to the string... and I know it looks useless, but it's a test for something else. what I want is to delete any and all characters from a string that don't fit into [a-zA-Z0-9]... unless things like "$(@$&%*" are in there...$a = "dfowusgfiwu42394353****hsdfsd"; print "$a\n"; $a =~ s/!([a-zA-Z0-9])//g; print "$a\n";
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: leaving only [a-zA-Z0-9]
by dvergin (Monsignor) on Mar 21, 2004 at 14:44 UTC | |
Re: leaving only [a-zA-Z0-9]
by BrowserUk (Patriarch) on Mar 21, 2004 at 13:51 UTC | |
Re: leaving only [a-zA-Z0-9]
by neniro (Priest) on Mar 21, 2004 at 13:58 UTC | |
by Happy-the-monk (Canon) on Mar 21, 2004 at 14:18 UTC | |
by neniro (Priest) on Mar 21, 2004 at 14:38 UTC |
Back to
Seekers of Perl Wisdom