You can try this
var mySubString = str.substring(
str.indexOf(":") + 1,
str.lastIndexOf(";")
);
More Related Contents:
- How to check whether a string contains a substring in JavaScript?
- Regular expression to get a string between two strings in Javascript
- Replace multiple strings with multiple other strings
- How can I extract a number from a string in JavaScript?
- Regular Expression to get a string between parentheses in Javascript
- Fastest method to escape HTML tags as HTML entities?
- How to check if a string contains text from an array of substrings in JavaScript?
- Split large string in n-size chunks in JavaScript
- Regular expression which matches a pattern, or is an empty string
- How do I check if string contains substring? [duplicate]
- Fastest way to check a string contain another substring in JavaScript?
- Remove whitespace and line breaks between HTML elements using jQuery
- Convert camelCaseText to Title Case Text
- How can I replace a regex substring match in Javascript?
- Passing regex modifier options to RegExp object
- Wrap tags around http text
- How to extract a string using JavaScript Regex?
- Regex to extract substring, returning 2 results for some reason
- Split string on the first white space occurrence
- Javascript unicode string, chinese character but no punctuation
- How do I split a string by whitespace and ignoring leading and trailing whitespace into an array of words using a regular expression?
- Insert space before capital letters
- Cutting a string at nth occurrence of a character
- Replacing accented characters with plain ascii ones [duplicate]
- JavaScript text between double quotes
- Best way to parse HTML in Javascript
- Use RegExp to match a parenthetical number then increment it
- JavaScript: indexOf vs. Match when Searching Strings?
- Removing backslashes from strings in javascript
- Find and replace nth occurrence of [bracketed] expression in string