#5630

Yutaka Emura
Keymaster

owilsky wrote:
I want the text between two commands/tags to be highlighted.

I want to highlight everything between two *FONT commands excluding the commands.

Example: *FONT 3text*FONT 0
here only “text” should be highlighted. The numbers 3 and 0 could be any number.

I tried this with lookbehind and lookahead:

(?<=*FONT ?d+).*?(?=*FONT ?d+)

Unfortunately lookbehind does not allow a regex but only text, so “(?<=*FONT ?d+)" does not work.

Any ideas how this could be achived?

Thanks!

Unfortunately, the regular expression engine does not support variable length of lookbehind and lookahead. You will need to have the expression fixed length in lookbehind and lookahead can be matched.