DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR JAVASCRIPT
Replace all ocourrences in JS
let str = 'hotdog dog'.replace(new RegExp('dog','g'), 'cat'); console.log(str) //output: hotcat cat
Source by www.syncfusion.com #
PREVIOUS
NEXT
Tagged:
#Replace
#ocourrences
#JS
ADD COMMENT
Topic
COMMENT
Name
4+2 =
Submit