I have a string like this:
filter-sex=1,1_filter-size=2,3_filter-material=3,5
How can I extract only the numeric pairs from it (“1,1”, “2,3” and “3,5”) and put them in an array?
I know I can use explode() multiple times, but I was wondering if there’s an easy way using regex.
I’m using PHP.
This :
should get all your number in the $result array.
Why: