PDA

Click to See Complete Forum and Search --> : Replace javascript ??


Bombdrop
May 5th, 2004, 04:36 AM
Hi i wish to do a replace in javascript


strTest=strTest.replace(/(Ascending)/g,"Asc,")


this will replace all instances of Ascending in the string and replace them with Asc, but it keeps the '()' I do not wish this any help guys

:wave: :thumb: :wave:

Acidic
May 5th, 2004, 05:01 AM
whats wrong with:

strTest=strTest.replace(/Ascending/g,"Asc,")


or else:

strTest=strTest.replace(/\(Ascending\)/g,"Asc,")