jquery multi match
How to do a multi match in jquery? match id = a 开发者_C百科+ num + b + num
or id = a + num + c + num
(num range from 1-99)? Thanks.
if($(this).attr("id").match(/^a\d{1,2}b\d{1,2}$/), $(this).attr("id").match(/^a\d{1,2}c\d{1,2}$/))
//only work the last match
Could you just put an or in your regex -
if($(this).attr("id").match(/^a\d{1,2}b\d{1,2}$|^a\d{1,2}c\d{1,2}$/))
精彩评论