Sorry for my late replay, but i was in hospital.
Nevertheless - thank you very, very for your help. Your advice works perfectly for my needs!
But there is a small cosmetic behavior. I use
, and in the active line the syntax highlighting with your regex code is disabled until i leave the line. In case of a normal syntax like Python the highlighted line shows the colored code!