Results 1 to 2 of 2

Thread: Replace javascript ??

  1. #1

    Thread Starter
    Fanatic Member Bombdrop's Avatar
    Join Date
    Apr 2001
    Location
    St Helens, England, UK
    Posts
    667

    Replace javascript ??

    Hi i wish to do a replace in javascript

    Code:
    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


  2. #2
    Frenzied Member Acidic's Avatar
    Join Date
    Sep 2003
    Location
    UK
    Posts
    1,090
    whats wrong with:
    Code:
    strTest=strTest.replace(/Ascending/g,"Asc,")
    or else:
    Code:
    strTest=strTest.replace(/\(Ascending\)/g,"Asc,")
    Have I helped you? Please Rate my posts.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width