Answers for "js string get substring between two characters"

3

javascript get string between two characters

const oldString = 'John1Doe2'

const stringBetweenCharacters = oldString.match(/1(.*?)2/i)[1] //Doe
Posted by: Guest on April-07-2021
3

javascript get text between two words

//Gets the part of the string inbetween the : and the ;
var part = str.substring(
    str.lastIndexOf(":") + 1, 
    str.lastIndexOf(";")
);
Posted by: Guest on June-04-2020
0

js string get substring between two characters

how are you : Pranjal ; are you ok?
Posted by: Guest on June-14-2021

Code answers related to "js string get substring between two characters"

Code answers related to "Javascript"

Browse Popular Code Answers by Language