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 ?
You could easily just do the following: cat=["com12", "com1", "cop233", "com1.1", "sap-12-1"]; cat = $.map(cat, function(a){ return a.replace(/[\d\.\-]/g, ""); }); Good Luck!
Leave a comment on shmuel613's reply
Change topic type
Link this topic
Provide the permalink of a topic that is related to this topic