I need help using a regex.
I have a string with characters and numbers. e.g:
str1="012345m67890man"
I want to keep only the substring "man" and the numbers. I don't need any other alpha characters.
I am using the following Regex, but it's displaying 'm' character also.
str1 = str1.replaceAll("[^(man0-9)]", "");
Actual output: 012345m67890man
Expected output: 01234567890man
If my string has any alpha characters other than man, I need to remove it.
Kindly help me with suggestions.