Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Reg
ular
Ex
pressions
101
Reg
ular
Ex
pressions
101
Upgrade to Pro
Enterprise
Regular Expression
/
^(?<modifier>(ctrl|alt|shift)(?:\+(ctrl|alt|shift)(?<!\2))?(?:\+(ctrl|alt|shift)(?<!\2|\3))?\+)?(?<key>[^\s+]|backspace|tab|enter|esc|escape|space|pgup|pageup|pgdn|pagedown|end|home|left|up|right|down|insert|delete|(?<!shift.+)(?:numpad_?[0-9]|numpad_(?:period|decimal))|numpad_(?:multiply|plus|add|minus|subtract|divide)|f[1-9]|f1[0-9]|f2[0-4]|plus)$
/
gm
Input 1
1
New
# These should all be allowed: shift+up ctrl+alt+delete shift+alt+ctrl+f2 ctrl+numpad_0 alt+f24 alt+pagedown pageup pgup pgdn up alt+numpad_0 ctrl+numpad_0 ctrl+numpad6 shift+numpad_divide Z | alt+| . numpad_0 ctrl+w ctrl+shift+1 ctrl+tab ctrl+shift+tab ctrl+shift+down ctrl+shift+pgup alt+1 shift+ctrl+space pageup f12 numpad_plus numpad_add numpad_minus numpad_subtract numpad_period numpad_decimal numpad_divide plus tab backspace shift+enter # These should NOT: + || alt shift + 1 ctrl alt+ alt++ shift+alt plus+shift shiftalt+up ctrl+ctrl+delete ctrl+alt+alt+delete +alt+down alt++down shift+alt+shift+up shift+ctrl+numpad_1 ctrl+shift+numpad_2 ctrl+alt+shift+numpad_2 shift+numpad0 shift+numpad_period shift+numpad_decimal shift+whatever shift+numpadperiod numpad_div tab+delete numpad_ f0 f25 99
Extraction