Testing regex matches and replacements in AutoHotkey

As you might know, AutoHotkey's regex uses PCRE flavour, different than .NET (the one used in Trados Studio). Both flavours share most of the patterns, but sometimes I'm confused when they are different.

So if you need to test regex patterns before using them in RegExMatch and RegExReplace AutoHotkey functions, this script can be very handy:

Just downloaded the AutoHotkey script from www.autohotkey.com/forum/topic17844.html.

Save it with AHK extension, run it, and you'll see a tester ready for AutoHotkey:

AutoHotkey RegEx Tester window with input fields for Haystack and Needle (RegEx). A note indicates to use n instead of rn and that quotes must not be escaped. The regex pattern d.+ is entered with match results shown below.



Generated Image Alt-Text
[edited by: Trados AI at 4:20 AM (GMT 0) on 5 Mar 2024]
emoji