var str1 = "When I say wall I want to split";
var chunks = str1.split("wall");
alert(chunks[0]); /* When I say */
alert(chunks[1]); /* I want to split */
More Related Contents:
- How to do case insensitive string comparison?
- How to interpolate variables in strings in JavaScript, without concatenation?
- How many bytes in a JavaScript string?
- Is there currently anyway to concatenate two or more string literal types to a single string literal type in TypeScript right now?
- How can I split a string into segments of n characters?
- How to escape JavaScript in JSP?
- Use dynamic (variable) string as regex pattern in JavaScript
- Does console.log invokes toString method of an object?
- JavaScript string and number conversion
- Convert JavaScript String to be all lower case
- Efficient Javascript String Replacement
- Get the first integers in a string with JavaScript
- match() returns array with two matches when I expect one match
- Javascript string comparison fails when comparing unicode characters
- Find the characters in a string which are not duplicated
- jQuery call function from a string [duplicate]
- HEX to Base64 converter for JavaScript
- how to convert a string to a Unix timestamp in javascript?
- Trying to capitalize the first character in array of strings, why this is not working?
- Are ES6 template literals faster than string concatenation?
- How Can I Truncate A String In jQuery?
- Javascript / Jquery – Get number from string
- How to test if a URL string is absolute or relative?
- Replace spaces with dashes and make all letters lower-case
- JQuery string contains check [duplicate]
- Why are there two kinds of JavaScript strings?
- Get filename from string path in javascript?
- Unicode string with diacritics split by chars
- JavaScript: replace last occurrence of text in a string
- Find and replace nth occurrence of [bracketed] expression in string