Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to removing &nbsp from a string..

Status
Not open for further replies.

netooi25

Programmer
Jul 30, 2004
25
US
I have a string that i get scanning a html file
using the html::tokeparser

however the string has two &nbsp characters at the end of the string sometimes..

I need to be able to remove these when they are present.
Thanks for any help
 
$string=~s/ //g;

will do it if they're the only   's in the string

$string=~s/ / /g;

will just convert them spaces which you can trim

$string =~ s/\s+$//;

HTH
--Paul





It's important in life to always strike a happy medium, so if you see someone with a crystal ball, and a smile on their face ... smack the fecker
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top