I am currently working on creating a filter for a video list. I have successfully put together a string that includes all the values selected by the user for filtering. Right now, I am passing this string as a parameter through the URL.
For example:
NOTE: Keep in mind that the user may choose fewer filters, so the parameter:
status:3&site:4&categories:15,2,3&actors:33,5,36&search:Grass%20hopper%20
, can vary. The provided example represents the maximum combination.
QUERY: How can I extract all the data using Regular Expressions (JS)?
Desired output:
['status=3', 'site=4', 'categories=15,2,3', 'actors=33,5,3', 'search=Grass hopper']
.
Currently, I have come up with this expression:
(\w+):(((\d+),)*(\d+)|(\d+))&*
, but I am unsure of how to proceed.
Thank you for any assistance provided.