dcsimg
www.webdeveloper.com
Results 1 to 4 of 4

Thread: Replace all characters ' in the string.

  1. #1
    Join Date
    Oct 2016
    Location
    Moscow
    Posts
    54

    Replace all characters ' in the string.

    Code:
    var spam = 'he'llo wo'rld'.replace("'", '')
    console.log(spam)
    How can I replace all characters ?

  2. #2
    Join Date
    Oct 2016
    Location
    Moscow
    Posts
    54
    I'm sorry. I resolved it.
    var spam = 'he'llo wo'rld'.replace(/\& # 3 9;/g, '')

  3. #3
    Join Date
    Mar 2007
    Location
    localhost
    Posts
    5,434
    I would have thought that decodeURI() would have been simpler...
    --> JavaScript Frameworks like JQuery, Angular, Node <--
    ... and please remember to wrap code with forum BBCode tags:-

    [CODE]...[/CODE] [HTML]...[/HTML] [PHP]...[/PHP]

    If you can't think outside the box, you will be trapped forever with no escape...

  4. #4
    Join Date
    Sep 2016
    Location
    London
    Posts
    6
    very informative post i will share it with others,

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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