So I'm looking at rewriting all the regex parts as plain strings. In my experiment, I changed a qr to a q and added a (?: ) around everything. I know the modifiers that will be used on the ultimate one that ties them all together, so I don't have to make them self-contained. I know how to stick it in the opening grouping syntax if I have to.
Now clearly using the single-q form of a string won't take $var things within it. But other than that, what exactly do I need to watch out for? What's different between the parsed single-quote-string literal and the qr literal?
I've also verified that simply not having the "self-containment" modifiers (xs-im) doesn't make it generate any different code. I'm supposing that these affect compile-time interpretation of the contents, and would not "do" anything with respect to making it generate worse code than simply having the grouping construct alone (?: ) would do. Furthermore, superfluous non-capturing parens shouldn't hurt it anyway since the optimizer blows past them, right? (But I'm sure there are cases where the groupers are not redundant and I can tell it matches the same or at least solves the same problem without them, but is technically different so the optimizer can't help there.)
I will note, though, that writing component qr's helps with error checking and debugging when writing the thing, since it will show the syntax error in a small section. But I can change to q's once it works, so it doesn't compile everything twice.
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |