I need to do a lot of regex things in javascript but am having some issues with the syntax and I can\'t seem to find a definitive resource on this.. for some reason when I d
I think your problem is that the match method is returning an array. The 0th item in the array is the original string, the 1st thru nth items correspond to the 1st through nth matched parenthesised items. Your "alert()" call is showing the entire array.