java - How to replace all non-digit charaters in a string? -
i need replace non-digit charaters in string. instance:
string: 987sdf09870987=-0\\\`42 replaced: 987**sdf**09870987**=-**0**\\\`**42
that's non-digit char-sequence wrapped **
charaters. how can string::replaceall()
?
(?![0-9]+$).*
the regex doesn't match want. how can that?
Comments
Post a Comment