How do I remove the non-numeric character from a string in java?

java, regex

Solution

Are you removing or splitting? This will remove all the non-numeric characters.

myStr = myStr.replaceAll( "[^\\d]", "" )

Problem

I have a long string. What is the regular expression to split the numbers into the array?

Original source