Can you tell us what is supposed to be the hash key in this input? It's impossible to tell by reading the code without knowing if there are tabs in your whitespace. And, are these fixed length records? (Or even a fixed number of lines?)
If there are no hashes in the records except the doubled ones, your regex could probably be as simple as /(##[^#]*)/g. (And it would be a lot faster.)
-sauoq "My two cents aren't worth a dime.";
In reply to Re: Multi-line Regex Performance
by sauoq
in thread Multi-line Regex Performance
by pboin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |