PDA

View Full Version : replace!


eagle_1010
11-22-2005, 12:08 AM
Hi. I am just wondering how it is possible to do a string replace?

I wish to replace quotes with no quotes. for example:

"something" should become just something (no quotes)

anyone? :)

FishMonger
11-22-2005, 01:17 AM
That's done with a regex.

$str = ' "something" ';
$str =~ s/"//g;

eagle_1010
11-22-2005, 01:20 AM
that's great, ill try that
:) I think i did that before ... but i will certainly try ;)