I would not expect the -xism part to cost anything over the (?: ) without that. Again, that makes me wonder if re-compiling the string is worse than incorporating a compiled regex in another qr. Naturally, being able to leave off the parens completely simplifies things.
The regex engine has improved its optimizations in successive versions of Perl too; I think I read something about that in either the 5.10 or 5.12 notes.
In reply to Re^4: Composing regex's dynamically
by John M. Dlugosz
in thread Composing regex's dynamically
by John M. Dlugosz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |