I have a java string with some text and html:
<title>test title</title>
blabla bla more text
What I am trying to achieve is two-fold:
1) Retrieve the content of <title></title>
and save it in a separate string.
2) Remove that part of the original string: <title>test title</title>
So the end result would be something like
originalString:
<title>test title</title>
blabla bla more text
newString:
blabla bla more text
pageTitle: test title
How can I achieve this? regular expressions? I can't really grasp it ...