/<%(?:==|=|#)?[^>]*%>/;
This regex isn’t exactly right for my needs. The [^>] part should be no pattern of '%>'
This are the available regex-features:
http://docs.kde.org/stable/en/kdebase-runtime/kate/regular-expressions.html
(there is no ? for greedy quantifiers)
The doc you linked to says lookaheads are supported, so this should work:
(?:(?!%>).)*allows the dot to match one character at a time, after the lookahead ensures that the character isn’t the beginning of a%>sequence. That’s effectively what the non-greedy dot-star would be doing in.*?%>, if non-greedy quantifiers were supported.By the way, the
(?:==|=|#)?isn’t really doing anything for you. If that part is supposed to be required, you should remove the?. If not, you might as well remove the whole thing; it’s just taking up space.