I want to write a regex pattern that would replace pure numbers with "". Example 3434 - must be replaced by "" but W3C - should be left untouched. Any ideas?
I want to write a regex pattern that would replace pure numbers with "". Example 3434 - must be replaced by "" but W3C - should be left untouched. Any ideas? ----------------------------------------------------------- for input "3443uierei783 32gh" you want the output as "uierei gh", correct??
if yes then you can use Scanner class and its API and break the current strings in to tokens and then append these tokens to a string.
No thats not what i want. May be i ll explain further. Say i have list of words - "rakesh","w3c","345" (in a arraylist). I want to remove the "345" from the list. For that i m trying to iterate over the list and if my regex matches for a pure number i intend to remove that entry in the list.
Please suggest a regex or may be a whole new way to do this.
Whenever this sort of question comes up I tell people to read the Java Tutorials. Look through that section; there are tags with "b" in for wordBoundary. Adding those tags to the \d+ might help. Using Pattern and Matcher you can get a reference to the substring which matched. Can't remember how to do it, but it's all in the Tutorial.
I think he's gonna try to grab my monkey. Do we have a monkey outfit for this tiny ad?
a bit of art, as a gift, that will fit in a stocking