java - How write regular expression to only remove token if there is no charect in it -
I have some strings like "my cell number 5656 is IEEE 3456 George in St." and I only remove the 3456 from the string Want to But, Regular Expression 564 removes 564 from IEEE regularly.
intputString.replaceAll ("(\\ d + [. -]? \\ d +) | \\ d +", ""); Can you please help me?
This will only work for this example:
intputString = IntputString.replaceAll ("\\ b \\ d + \\ b", ""); i.e. Match any number of words at
Comments
Post a Comment