DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR JAVASCRIPT
javascript get string between two characters
const oldString = 'John1Doe2' const stringBetweenCharacters = oldString.match(/1(.*?)2/i)[1] //Doe
PREVIOUS
NEXT
Tagged:
#javascript
#string
#characters
ADD COMMENT
Topic
COMMENT
Name
6+1 =
Submit