I have some strings that start with a number and a white space and I want to remove everything after that whistle. I am
First String:
1 ABC DF
What do I need:
abd def
second string:
1 23 asp
What do I need:
< Code> 23 abs
What is the best way to do this in Java? I know that it can be obtained from regular expression and string methods, but the way is the least?
str = str.replaceFirst ("^ [0- 9] +", " );
No comments:
Post a Comment