RegEx 106-Use Named subpatterns in AutoHotkey Regular Expressions

Named subpatterns in AutoHotkey Regular ExpressionsUsing Regular Expressions in AutoHotkey is awesome!  On more complex expressions, I like to use Named subpatterns in AutoHotkey Regular Expressions to, automatically, store the results in named variables which indicate what they represent.

I typically get my RegEx working properly then I go back and change the pattern to using a named subpattern.  For instance if the following was your RegEx that you got working:

(\w\w\w)/(\d\d)/(\d\d\d\d) I would go back and adapt it to:

“(?P<Mon>\w\w\w)/(?P<Day>\d\d)/(?P<Year>\d\d\d\d)”

Video demonstrating how to create Named subpatterns in AutoHotkey Regular Expressions

 

Leave a Reply