'Split a String into 2 Strings [duplicate]
I am using Java and want to split a string without deleting any of the content.
Here are 2 examples,
I wish to split String hi = "HELLO123"
into "HELLO"
and "123"
and I wish to split "TEST123"
into "TEST"
and "123"
. Is there any java code that can do such a task? (It will always split the String between an Integer and an uppercase letter from the English language)
I tried using .substring()
and .split()
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|