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
r"
^ # (?P<Sign>[-+]*) (?P<Prefix> # prefix can be 0(b+|B+|x+|X+)? # 0, 0b, 0B, 0x, 0X, 0bb, 0BB, ... | # or empty ) (?P<Constant> # BUG If prefix is followed by two or more x, it doesn't works correctly (?<=0[xX]) # is prefix for hex digits? [\da-fA-F]+ # so, collect hex digits | # otherwise \d+ # collect decimal digits ) (?P<Suffix> (?<=[eE]) # is constant ending with an `E`? [\w\d+\-.]* # so, collect `+` and `-` operators | # otherwise \w # collect suffixes that starts with an letter [\w\d.]* # and letters, digits and dots that follows it | # finally, do suffix be optional (empty) )
"
gmx
Input 1
1
0xc0ffee 0xb0b
Extraction
0xc0ffee 0xb0b