We are about to switch to a new forum software. Until then we have removed the registration on this forum.
How can I use Processing to search strings (Text from a webpage) and pull out the words in-between a tag, for example everything between <p> and </p>
Answers
https://Processing.org/reference/String_indexOf_.html
https://Processing.org/reference/String_substring_.html
What about regular expression?
Yeah this is it, I am using a regular expression on Max MSP but I cannot yet understand how to achieve finishing that patch so I'm trying to do it on Processing instead. I want to extract the regexp of stuff inside a paragraph tag and write it to a text file. This looks like it could work I will try it out. Thank you
Ok here is my very noob code sorry I am just not getting how to loadStrings properly, this doesn't work, how could I like break down the lines[] so it can be used in this regular expression method ?
you could combine all the lines into one string like this:
completeText = join(lines," ");
Will combine all the lines and separate them with a space
Excellant. Thank you all, this works