I'd probably try a regex only, but I'm not sure it will improve matters. This code assumes /reg exp/ does not match | characters and that $string doesn't start with a |:
my @results = $string =~ /(reg exp)(?:\||$)/g;
In reply to Re: Performance optimization question
by Joost
in thread Performance optimization question
by vit
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |