Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Reg
ular
Ex
pressions
101
Upgrade to Pro
Enterprise
Regular Expression
/
select\[([^\s]*(?<param>[a-z0-9]+)[^,\s]*)*\]
/
g
Input 1
select[ 1, 22 ,word, two words ] attempting to load capture group with (numerics or alpha-num options) from comma separated list ignoring leading/trailing whitespace of each param but preserving space between words (ie "two words). results like param1: "1" param2: "22" param3: "word" param4: "two words" once thats sorted, would liek to handle optional single quote ' around parameters. Thanks for the consideration
Substitution
\1
select[ 1, 22 ,word, two words ] attempting to load capture group with (numerics or alpha-num options) from comma separated list ignoring leading/trailing whitespace of each param but preserving space between words (ie "two words). results like param1: "1" param2: "22" param3: "word" param4: "two words" once thats sorted, would liek to handle optional single quote ' around parameters. Thanks for the consideration