If original build_regex can return expression with "start of string" or "end of string" markers, these should be replaced, for my approach, with lookarounds for $sep, of course.
Huge regex with many alternations is different to what I suggested, and may suit better your data/expected output.
In reply to Re^3: Multi-thread combining the results together
by vr
in thread Multi-thread combining the results together
by Marshall
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |