import java.util.*;
import java.lang.*;
import java.io.*;
import java.util.regex.*;
class Ideone
{
{
String rx
= "\\B(?<!\\d)\\d\\b"; System.
out.
println("I am the number1".
replaceAll(rx,
"")); // => I am the number
System.
out.
println("I am the number11".
replaceAll(rx,
"")); // => I am the number11
System.
out.
println("I am 4the number1 @#@%$grtuy".
replaceAll(rx,
"")); // => I am 4the number @#@%$grtuy
System.
out.
println("I am number1 1 and you number2 2".
replaceAll(rx,
"")); // => I am number 1 and you number 2
}
}
aW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CmltcG9ydCBqYXZhLnV0aWwucmVnZXguKjsKCmNsYXNzIElkZW9uZQp7CglwdWJsaWMgc3RhdGljIHZvaWQgbWFpbiAoU3RyaW5nW10gYXJncykgdGhyb3dzIGphdmEubGFuZy5FeGNlcHRpb24KCXsKCQlTdHJpbmcgcnggPSAiXFxCKD88IVxcZClcXGRcXGIiOwoJCVN5c3RlbS5vdXQucHJpbnRsbigiSSBhbSB0aGUgbnVtYmVyMSIucmVwbGFjZUFsbChyeCwgIiIpKTsKCQkvLyA9PiBJIGFtIHRoZSBudW1iZXIKCQlTeXN0ZW0ub3V0LnByaW50bG4oIkkgYW0gdGhlIG51bWJlcjExIi5yZXBsYWNlQWxsKHJ4LCAiIikpOyAKCQkvLyA9PiBJIGFtIHRoZSBudW1iZXIxMQoJCVN5c3RlbS5vdXQucHJpbnRsbigiSSBhbSA0dGhlIG51bWJlcjEgQCNAJSRncnR1eSIucmVwbGFjZUFsbChyeCwgIiIpKTsgCgkJLy8gPT4gSSBhbSA0dGhlIG51bWJlciBAI0AlJGdydHV5CgkJU3lzdGVtLm91dC5wcmludGxuKCJJIGFtIG51bWJlcjEgMSBhbmQgeW91IG51bWJlcjIgMiIucmVwbGFjZUFsbChyeCwgIiIpKTsKCQkvLyA9PiBJIGFtIG51bWJlciAxIGFuZCB5b3UgbnVtYmVyIDIKCX0KfQ==