I have some expression in a Java string, and a will get the letter that was to the left and right of the specific character.
Here are two examples:
X-Y
X-V-Y
Now I need to extract the letter X and Y in a separate line in the first example. And in the second example, I need to extract the letters X, V and Y on a separate line.
How can I implement this requirement in Java?
source
share