Javascript get query string values using non-capturing group

Given this query string:


How can I extract the values from only these param types 'product_cat, product_tag, attr_color, attr_size'

returning only 'mens-jeans,shirts,fall,classic-style,charcoal,brown,large,x-small

I tried using a non capturing group for the param types and capturing group for just the values, but its returning both.


Source: regex

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.