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
/
(?<result>(?<data>^[\d|,]+)(?: in )(?<cat>.+?)(?<extra>\s+(?:\(.+?\)?)?))$
/
gm
Input 1
1
New
286,879 in Home & Kitchen (See Top 100 in Home & Kitchen) 339 in Cardboard Cutouts 2,945 in Jigsaws (Toys & Games)
Substitution
$3 = $2
286,879 in Home & Kitchen (See Top 100 in Home & Kitchen) 339 in Cardboard Cutouts 2,945 in Jigsaws (Toys & Games)