How do I remove the non-numeric character from a string in java? [closed] March 19, 2023 by Tarik Are you removing or splitting? This will remove all the non-numeric characters. myStr = myStr.replaceAll( "[^\\d]", "" )