Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Regular
Expressions
101
Regular
Expressions
101
Upgrade to Pro
Enterprise
Regular Expression
/
.*U([0-9]+)-S([0-9]+)-P([0-9]+)
/
gm
Test String
New
WS-S5-S-L1-C31-F-U5-S9-P14 WS-S5-S-L1-C31-F-U5-S8-P1 WS-S5-N-L1-C29-V-U16-S6-P6
Substitution
Processing...
0$1-0$2-0$3