Possible bug in referencing predefined named subroutines
Posted: Fri Mar 29, 2019 5:59 pm
I'm hoping that someone can help me determine whether or not the following is a software bug, or if I'm doing something wrong (most likely).
I am building a series of regular expressions composed of predefined named subroutines. In this example, I reference the predefined named subroutine 'id' within another predefined named subroutine 'id_alias'. In my non-minimal code, I make many more references to predefined named subroutines from within other predefined named subroutines. I have come up with a minimal example that demonstrates the problem I am about to describe:
When I attempt to apply this regex in TextPad 8.1.2 (64-bit Edition), I receive the message "Encountered an infinite recursion". This regex works when I test it using the following link:
https://regex101.com/r/gTLkmm/1
Is it not possible to reference predefined named subroutines from within other predefined named subroutines in TextPad?
I am building a series of regular expressions composed of predefined named subroutines. In this example, I reference the predefined named subroutine 'id' within another predefined named subroutine 'id_alias'. In my non-minimal code, I make many more references to predefined named subroutines from within other predefined named subroutines. I have come up with a minimal example that demonstrates the problem I am about to describe:
Code: Select all
(?(DEFINE)(?'comment'\/\*(?!\*\/)[\/s\/S]*?\*\/|\/\/.*+)
(?'quoted_string'\"[^\"]*\")
(?'id'\b[a-zA-Z_]\w*+\b)
(?'id_alias'(?&id))
)(?&comment)(*SKIP)(*F)|(?"ed_string)(*SKIP)(*F)|(?&id_alias)https://regex101.com/r/gTLkmm/1
Is it not possible to reference predefined named subroutines from within other predefined named subroutines in TextPad?