Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js substring between two characters


let str = "My string is:abc;";

var mySubString = str.substring(
    str.indexOf(":") + 1, 
    str.lastIndexOf(";")
);

// mySubString = "abc"
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #js #substring #characters
ADD COMMENT
Topic
Name
4+5 =