Consider a non-DOM scenario where you'd want to remove all non-numeric characters from a string.
var myString = 'abc123.8<blah>';
//desired output is 1238
Question: How would you achieve this in plain Javascript? Please remember this is a non-DOM scenario, so jQuery and other solutions involving browser and keypress events aren't suitable.