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
/
(?:,|^)[ ]*1004[ ]*(?=,)|(?<=,)[ ]*1004[ ]*(?:,|$)|^[ ]*1004[ ]*$
/
gm
Input 1
New
1004, 1001 , 11004, 1002, 1003, 1004 , 1005,ABC100,10041,ABC102, 1004
Extraction
1004, 1001 , 11004, 1002, 1003, 1004 , 1005,ABC100,10041,ABC102, 1004