0

I am extracting lines of text in Java and then identifying certain values within the text. I need to create two getters to obtain them (as seen in Example 1 and 2).

How to extract string between characters?

First example

<element> or <element text="">

with the desired outcome being the word element.

Second example

<element>VALUE</element>

with the desired outcome being the word VALUE. I would guess the best way would be pattern matching?

0 Answers0