Try this:
function filterArray(arr) { var newArr = []; for (var i = 0; i < arr.length; i++) { newArr.push(arr[i].replace(/[0-9\-.]/g, '')); } return newArr; } runrunforest wrote: > > > Hi, > > I have an array like this cat=(com12, com1, cop233, com1.1, sap-12-1) > > I want to take out all the numbers and "." and "-" signs > > the desire result is cat=(com, com, cop, sap) > > how can i do that please ? > > -- View this message in context: http://www.nabble.com/trim-string-tp25433275s27240p25436583.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.