I'm trying to use the replace() method in javascript to remove a segment from the 
string. The segment is " - " (space,dash,space) and I've tried:

myField.value.replace(' - ','');
myField.value.replace(/ - /,'');
myField.value.replace(/ - /i,''); (getting desperate here!)
myField.value.replace(/ \- /,'');
myField.value.replace(/[ ][-][ ]/,'');

none of these work! Can anyone advise?

Douglas

--
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]

Reply via email to