freelanceprogrammers.org Forum Index » Perl
deleting unwanted characters from string
Joined: 06 Feb 2002
Posts: 5
deleting unwanted characters from string
It may be a line feed (
). If you want to get
rid of everything but numbers and chars, try
this:<br><br>$line =~ s/[^a-z0-9]//ig;<br><br>If you want to add in
other chars, just put them inside of the brackets (make
sure to escape special chars such as `$`).<br><br>This
stuff is pretty straight forward, just read the
perlrequick POD (available on any decent Perl site or with
your Perl distribution).
Joined: 15 Feb 2002
Posts: 2
deleting unwanted characters from string
Is there a way to just check for the content to make sure everything is chars
and numbers?
Joined: 15 Feb 2002
Posts: 2
deleting unwanted characters from string
Is there a way to just check for the content to make sure everything is chars
and numbers?
All times are GMT
Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Freelace Website Designer - Customer web design and software building.
China Wholesale - Electronics Products
Character Studio - Tutorials and Help
China Wholesale - Electronics Products
Character Studio - Tutorials and Help







