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
Parents Reply
  • The link could be dead, that happens frequently.

    Yes it does... although in this case it seems to have been there for 12 years already and is also updated in the initial post.

    You have posted his efforts under Your name.

    No he hasn't.  He shared the link to the autohotkey forum where this script is hosted.  I think this is perfectly correct and didn't think for a second that he was saying he wrote it.  Also the idea to use the original post is a good one since the script may indeed get updated.

    I don't really understand why you are posting in this way .

    Paul Filkin | RWS Group

    ________________________
    Design your own training!

    You've done the courses and still need to go a little further, or still not clear? 
    Tell us what you need in our Community Solutions Hub

Children