#7978
Kord
Participant

Wow! I didn’t realise using back-references in the search string was done!

Now… it’s very possible I’ve misunderstood your highlighter… but I just wanted to try out the backref feature anyway…

First highlight example
^^s*((((=|+){1,5})[^^=+]+?3)|((-|_|=){19}6+))s*$

First highlighter example
I may also have interpreted nested priorities wrong, but are those back-references inside the groups they reference? … probably not, but that could explain the slowdown if it were doing that and not breaking :-)

Anyway, I was wondering if changing to these 2 highlights instead of that 1, speeds it up? Unless it’s way off the mark regarding what you require…

^((=|+){1,5})(?!=|+).*1$

This should only highlight lines starting with, 1-5 + or = characters, and ending identically.

^(-|_|=){20,}S.*

This should only match lines that start with 20 or more, “-“, “_” or “=” characters, and aren’t immediately proceeded by a whitespace char. Hopefully, they aren’t too far off!