aha! It's because my original html was using   instead of a space.
D

-----Original Message-----
From: Douglas Humphris 
Sent: 04 October 2002 14:45
To: [EMAIL PROTECTED]
Subject: [ cf-dev ] OT: js regExp


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]


--
** 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