Search
 
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
Name
1+2 =