SuperLes2006
01-18-2006, 09:36 AM
I'm trying to remove a the characters "//" from a line of parsed text.
The text being parsed looks like this......
//PackerSetting=0//0.0 cm
SpringSetting=10//200 N/mm
Gear1Setting=0//13/41 (12.615)
I would like to remove only the double instance of the characters "//"
and not the single instance of "/" so the text would look like this
PackerSetting=00.0 cm
SpringSetting=10200 N/mm
Gear1Setting=013/41 (12.615)
Here's the code I am using..
function parsetext( value )
{
value == ( "" );
return value.replace(/["//"]/g, ""); value;
}
The Problem is that it removes the single instance of "/" also and I end up with this..
PackerSetting=00.0 cm
SpringSetting=10200 Nmm
Gear1Setting=01341 (12.615)
How do I remove the double instance only? :confused:
The text being parsed looks like this......
//PackerSetting=0//0.0 cm
SpringSetting=10//200 N/mm
Gear1Setting=0//13/41 (12.615)
I would like to remove only the double instance of the characters "//"
and not the single instance of "/" so the text would look like this
PackerSetting=00.0 cm
SpringSetting=10200 N/mm
Gear1Setting=013/41 (12.615)
Here's the code I am using..
function parsetext( value )
{
value == ( "" );
return value.replace(/["//"]/g, ""); value;
}
The Problem is that it removes the single instance of "/" also and I end up with this..
PackerSetting=00.0 cm
SpringSetting=10200 Nmm
Gear1Setting=01341 (12.615)
How do I remove the double instance only? :confused: