var pattern:RegExp = /\d+/; // matches one or more digits in a sequence
var str:String = "Test: 337, 4, or 57.33.";
trace(str.search(pattern)); // 6
trace(str.match(pattern)); // 337
var pattern:RegExp = /\d+/g; // The g flag makes the match global.
trace(str.match(pattern)); // 337,4, 57, 33