I'm trying to parse an email body and get the next 3 lines after the word "Location" in javascript.
Here is my text:
Blah blah other email content
Location:
1600 Pennsylvania Avenue
Washington, DC 20006
USA
So the first thing I know to do is use indexOf to parse for "Location" but how do I get the three lines after that? Do I have to do a "split" of all lines in the text area and then use "\n" to somehow go to the next few lines? Do I have to use RegEx?
var a = textarea;
var b = a.split("\n");
var c = b.indexOf("Location");