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
~
^(?:(?<prefix>[A-Z]+)[\s/-]*)?(?<number>\d{2,9})(?:[\s/-]*(?<suffix>[A-Za-z]+))?(?:[\s/-]*(?<joint>\d{1,2}))?$
~
gm
Input 1
1
New
9999LI JKB9999LI00 JKB/999-LI/0 9999 LI JKB 999 LI 00 9999LI 0 9999LI1 JKB000009999LI01 JKB-999-LI-00
Substitution
9999LI JKB9999LI00 JKB/999-LI/0 9999 LI JKB 999 LI 00 9999LI 0 9999LI1 JKB000009999LI01 JKB-999-LI-00