This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

strip slashes

Old posts that have not been replied to for several years.
Locked
User avatar
CrazyCat
Revered One
Posts: 1354
Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:

strip slashes

Post by CrazyCat »

hi there...
Does anyone know how to strip the slashes in a variable?
I take lines from a website, and I send them on a chan, but when they contains quote or other special characters, I get this:
<M0rgane> I\'m so happy

and I want :
<M0rgane> I'm so happy

Thanx helping me
User avatar
Papillon
Owner
Posts: 724
Joined: Fri Feb 15, 2002 8:00 pm
Location: *.no

Post by Papillon »

first thing popping to my mind would be to use regsub

Code: Select all

regsub -all "\\" $var "" var
Elen sila lúmenn' omentielvo
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

It sounds more like youare handling the input of the caracters wrong in the first place.

As such, there amy be more to it, than just the slash than you can see.
Locked