I am trying to extract all numbers from a string but I got the below code to work although it stops after the first match for 123.
String str = '123-456/7890';
Pattern p = Pattern.compile('(\\d+)');
Matcher m = p.matcher( str );
if( m.find() ){
system.debug( '-->>' + m.group() );
}