It is necessary to create a regular expression that will highlight the words msg or oh (any register) in the string, but only those followed by a pair of curly braces with any content inside {} and after all this stands;
for example, this line:
mSg { sda\r\n sadsa\r\n da\r\n}; //dfgdg oh{fsdf}; jj msg {ddd msg msg { sda\r\n sadsa\r\n da\r\n}; //dfgdfg I tried this:
(msg|oh)(?=(\s*{(\s|.)*}\s*;)) comes out the following:
mSg //Π²ΡΠ΄Π΅Π»ΠΈΠ»ΠΎΡΡ (ΠΊΠ°ΠΊ ΠΈ Π΄ΠΎΠ»ΠΆΠ½ΠΎ) { sda\r\n sadsa\r\n da\r\n}; //dfgdg oh{fsdf}; jj //Π²ΡΠ΄Π΅Π»ΠΈΠ»ΠΎΡΡ (ΠΊΠ°ΠΊ ΠΈ Π΄ΠΎΠ»ΠΆΠ½ΠΎ) msg {ddd //Π½ΠΎ Π΅ΡΡ Π²ΡΠ΄Π΅Π»ΠΈΠ»ΠΎΡΡ ΡΡΠΎ (Π° Π½Π΅ Π΄ΠΎΠ»ΠΆΠ½ΠΎ, Π²Π΅Π΄Ρ Π½Π΅Ρ Π·Π°ΠΊΡΡΠ²Π°ΡΡΠ΅ΠΉ ΡΠΊΠΎΠ±ΠΊΠΈ) msg //Π½Π΅ Π²ΡΠ΄Π΅Π»ΠΈΠ»ΠΎΡΡ (ΠΊΠ°ΠΊ ΠΈ Π΄ΠΎΠ»ΠΆΠ½ΠΎ) msg { sda\r\n //Π²ΡΠ΄Π΅Π»ΠΈΠ»ΠΎΡΡ (ΠΊΠ°ΠΊ ΠΈ Π΄ΠΎΠ»ΠΆΠ½ΠΎ) sadsa\r\n da\r\n}; //dfgdfg