That'd be also interesting indeed, except that regexes should operate on the OP-tree, not a string. Shouldn't be a too big problem with (??{}) and friends though. | [reply] [d/l] |
I tried hard to use a regex (??{}) solution for my Pentominos Solving Quine, but in a recursion scenario, there are some issues with re-entrancy which can cause (at least some versions of) perl's interpreter to crash.
If you don't have to recurse, then by all means, any backtracking problem you can implement in the regex engine is fiendishly clever. Of course, "clever code" is for fun, not generally for maintainable code.
-- [ e d @ h a l l e y . c c ]
| [reply] [d/l] |