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
/
.*?(\/set ship #.(.).).*
/
g
Input 1
1
This bit of regex is going to find the second number in "/set ship #123" and display it. If you changed where the parenthesis are ".*?(\/set ship #(.)..).*" then you can find the other two numbers. If you removed the ?, then it would find the second "/set ship #456" and use those numbers.
Extraction
This bit of regex is going to find the second number in "/set ship #123" and display it. If you changed where the parenthesis are ".*?(\/set ship #(.)..).*" then you can find the other two numbers. If you removed the ?, then it would find the second "/set ship #456" and use those numbers.