I have a string:
produits/mousse-de-montage/marque/pbb/item/promax-pro-expansion
Everything that goes after produits
is optional and must be captured by groups, here is my regex
/^.*produits(.*)?(\/marque\/.*)?(\/item\/.*)?/g
For some strange reason, he put those 3 groups into a single one. If i remove question mark, he will split in 3 groups.