When I run your regex and a simplified form through use re 'debug' I'm getting the same Regex-opcodes:
C:/Perl_64/bin\perl.exe d:/Users/RL/pm/re_tidy.pl Compiling REx "(?^:(?^:(?^:(?^:(?^:(?^:(?^:(?^:(?^:(?^:(?^:.).).).).). +).).)"... Final program: 1: REG_ANY (2) 2: REG_ANY (3) 3: REG_ANY (4) 4: REG_ANY (5) 5: REG_ANY (6) 6: REG_ANY (7) 7: REG_ANY (8) 8: REG_ANY (9) 9: REG_ANY (10) 10: REG_ANY (11) 11: REG_ANY (12) 12: END (0) minlen 11 (?^:(?^:(?^:(?^:(?^:(?^:(?^:(?^:(?^:(?^:(?^:(?^:.).).).).).).).).).).) +) at d:/Users/RL/pm/re_tidy.pl line 27. Freeing REx: "(?^:(?^:(?^:(?^:(?^:(?^:(?^:(?^:(?^:(?^:(?^:.).).).).).) +.).)"... Compiling REx "(?^:...........)" # simplified: 11 dots in a row Final program: 1: REG_ANY (2) 2: REG_ANY (3) 3: REG_ANY (4) 4: REG_ANY (5) 5: REG_ANY (6) 6: REG_ANY (7) 7: REG_ANY (8) 8: REG_ANY (9) 9: REG_ANY (10) 10: REG_ANY (11) 11: REG_ANY (12) 12: END (0) minlen 11 (?^:(?^:...........)) at d:/Users/RL/pm/re_tidy.pl line 27. Freeing REx: "(?^:...........)" Compilation finished at Fri Dec 8 23:40:00
Apparently while the stringification may differ, the resulting code is identical.
Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Wikisyntax for the Monastery
In reply to Re: Tidying and simplifying a regular expression (opcode)
by LanX
in thread Tidying and simplifying a regular expression
by Dallaylaen
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |