Monday, November 15, 2021

UltraEdit regular expressions

Swap 2 words separated by whitespaces


Find what: (\w+)(\s+)(\w+)
Replace with: $3$2$1


Before:
0x01 HID_USAGE_GENERIC_POINTER
0x02 HID_USAGE_GENERIC_MOUSE
0x04 HID_USAGE_GENERIC_JOYSTICK
0x05 HID_USAGE_GENERIC_GAMEPAD
0x06 HID_USAGE_GENERIC_KEYBOARD
0x07 HID_USAGE_GENERIC_KEYPAD
0x08 HID_USAGE_GENERIC_MULTI_AXIS_CONTROLLER

After:
HID_USAGE_GENERIC_POINTER 0x01
HID_USAGE_GENERIC_MOUSE 0x02
HID_USAGE_GENERIC_JOYSTICK 0x04
HID_USAGE_GENERIC_GAMEPAD 0x05
HID_USAGE_GENERIC_KEYBOARD 0x06
HID_USAGE_GENERIC_KEYPAD 0x07
HID_USAGE_GENERIC_MULTI_AXIS_CONTROLLER 0x08

No comments:

Post a Comment