|text to get| Other text.... migh have "|"'s ...
How can I get the text to get
stuff from the string (and remove it)?
It should be just the first match
Select a cell which you will place the result, type this formula =MID(LEFT(A1,FIND(">",A1)-1),FIND("<",A1)+1,LEN(A1)), and press Enter key. Note: A1 is the text cell, > and < are the two characters you want to extract string between.
In the Cell box, select a cell where you want to extract the text (here I select cell B5); In the Start char(s) box, enter the start word of the two words you want to extract all text strings after it; In the End char(s) box, enter the end word of the two words you want to extract all text strings before it.
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);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With