var test_str = "|text to get| Other text.... migh have \"|\"'s ...";
var start_pos = test_str.indexOf('|') + 1;
var end_pos = test_str.indexOf('|',start_pos);
var text_to_get = test_str.substring(start_pos,end_pos)
alert(text_to_get);
More Related Contents:
- Escaping HTML strings with jQuery
- How to find if an array contains a specific string in JavaScript/jQuery?
- How do I check if string contains substring? [duplicate]
- Remove whitespace and line breaks between HTML elements using jQuery
- How can I use jQuery to style /parts/ of all instances of a specific word?
- How can val() return Number?
- Wrap tags around http text
- Convert javascript array to string
- Split a string based on multiple delimiters
- How to trim() white spaces from a string?
- Insert space before capital letters
- Format a JavaScript string using placeholders and an object of substitutions?
- jQuery call function from a string [duplicate]
- How Can I Truncate A String In jQuery?
- Remove occurrences of duplicate words in a string
- Javascript / Jquery – Get number from string
- How to test if a URL string is absolute or relative?
- Put quotes around a variable string in JavaScript
- How to check if a string is a legal “dd/mm/yyyy” date?
- JQuery string contains check [duplicate]
- Find and replace nth occurrence of [bracketed] expression in string
- Does jQuery strip some html elements from a string when using .html()?
- How to flatten array in jQuery?
- Split a string, at every nth position, with JavaScript? [duplicate]
- How to hide optgroup/option elements?
- Wait for background images in CSS to be fully loaded [duplicate]
- Ajax POST not sending data when calling ‘request.POST’ in Django view
- How to put all elements’ content in array using jQuery ?
- Failed to execute ‘atob’ on ‘Window’
- JQuery getJSON – ajax parseerror