{"id":486807,"date":"2026-07-09T18:17:17","date_gmt":"2026-07-09T18:17:17","guid":{"rendered":"https:\/\/savepearlharbor.com\/?p=486807"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=486807","title":{"rendered":"\u0410\u0442\u043e\u043c\u0430\u0440\u043d\u044b\u0435 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u044b\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f"},"content":{"rendered":"<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0435\u0440\u0438\u0438 \u0441\u0442\u0430\u0442\u0435\u0439 \u043c\u044b \u043f\u043e\u0433\u0440\u0443\u0436\u0430\u0435\u043c\u0441\u044f \u0432 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u044f\u0437\u044b\u043a\u0430 AutoHotkey \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0432\u044b\u0432\u043e\u0434\u0430 \u0446\u0432\u0435\u0442\u043d\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442\u0430 \u0432 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b \u0434\u043b\u044f \u0443\u0442\u0438\u043b\u0438\u0442\u044b <a href=\"https:\/\/github.com\/JoyHak\/Launcher\" rel=\"noopener noreferrer nofollow\">Launcher<\/a>.<\/p>\n<p><a href=\"https:\/\/habr.com\/ru\/articles\/1053046\/\" rel=\"noopener noreferrer nofollow\">\u0427\u0430\u0441\u0442\u044c 1: \u041d\u0430\u0438\u0432\u043d\u044b\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0438 \u0435\u0433\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f<\/a> <br \/><a href=\"https:\/\/habr.com\/ru\/articles\/1054876\/\" rel=\"noopener noreferrer nofollow\">\u0427\u0430\u0441\u0442\u044c 2: \u0423\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438<\/a> <br \/>\u0427\u0430\u0441\u0442\u044c 3: \u0410\u0442\u043e\u043c\u0430\u0440\u043d\u044b\u0435 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u044b\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f (\u0432\u044b \u0437\u0434\u0435\u0441\u044c) <br \/>\u0427\u0430\u0441\u0442\u044c 4: \u0414\u0435\u043a\u043b\u0430\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 <br \/>\u0427\u0430\u0441\u0442\u044c 5: 256 \u0446\u0432\u0435\u0442\u043e\u0432 \u0438 \u0441\u0442\u0438\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0442\u0435\u043a\u0441\u0442\u0430<\/p>\n<p>\u0412 \u043f\u0440\u043e\u0448\u043b\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u043c\u044b \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043b\u0438\u0441\u044c \u0441 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u043c\u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044f\u043c\u0438 \u0438 \u043d\u0430\u0443\u0447\u0438\u043b\u0438\u0441\u044c \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u0438\u0445 \u0432 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0435 \u0434\u043b\u044f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0446\u0432\u0435\u0442\u0430 \u0442\u0435\u043a\u0441\u0442\u0430. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c\u0441\u044f \u0432 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u0445 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0442 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0446\u0432\u0435\u0442 \u0446\u0435\u043b\u043e\u0433\u043e \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0430 \u0442\u0435\u043a\u0441\u0442\u0430.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u043d\u0435 \u0437\u043d\u0430\u043a\u043e\u043c\u044b \u0441 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u044b\u043c\u0438 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f\u043c\u0438 \u043d\u0430 \u0431\u0430\u0437\u043e\u0432\u043e\u043c \u0443\u0440\u043e\u0432\u043d\u0435, \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c <a href=\"https:\/\/habr.com\/ru\/articles\/545150\/\" rel=\"noopener noreferrer nofollow\">\u044d\u0442\u0443 \u0441\u0442\u0430\u0442\u044c\u044e<\/a>. \u0415\u0441\u043b\u0438 \u0432\u044b \u043d\u0435 \u0437\u043d\u0430\u043a\u043e\u043c\u044b \u0441 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u043e\u043c AutoHotkey, \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c <a href=\"https:\/\/habr.com\/ru\/articles\/1053046\/\" rel=\"noopener noreferrer nofollow\">\u043f\u0435\u0440\u0432\u0443\u044e \u0447\u0430\u0441\u0442\u044c<\/a>. \u041e\u0434\u043d\u0430\u043a\u043e \u0434\u043b\u044f \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u044d\u0442\u043e \u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \ud83d\ude09<\/p>\n<h3>\u0421\u0442\u0440\u043e\u0438\u043c \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f<\/h3>\n<h4>\u041f\u0430\u0440\u043d\u044b\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b<\/h4>\n<p>\u0412 \u043f\u0440\u043e\u0448\u043b\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u043c\u044b \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0438 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u0430\u0440 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432: <code>\" \"<\/code> \u0438\u043b\u0438 <code>* *<\/code>. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u044b\u0439 \u043c\u0430\u0441\u0441\u0438\u0432  <code>aRegexColor<\/code> \u0438\u0437 \u043f\u0430\u0440 \u201c\u0441\u0438\u043c\u0432\u043e\u043b-\u0446\u0432\u0435\u0442\u201d, \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u043c \u0435\u0433\u043e \u0432 HashMap <code>chrColors<\/code> \u0441 \u043f\u0430\u0440\u0430\u043c\u0438 \u201c\u0441\u0438\u043c\u0432\u043e\u043b-\u043a\u043e\u0434\u201d, \u0430 \u0437\u0430\u0442\u0435\u043c \u0438\u0449\u0435\u043c \u043a\u0430\u0436\u0434\u0443\u044e \u043f\u0430\u0440\u0443 \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043f\u0435\u0440\u0435\u0434 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0438\u043c \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u043c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0435\u043c\u0443 \u0441\u0438\u043c\u0432\u043e\u043b \u0438\u0437 <code>chrColors<\/code>:<\/p>\n<pre><code class=\"coffeescript\">Color(msg, aRegexColor) {    static colors := Map(        'black',    30,        'red',      31,        'orange',   33,        'magenta',  35,        'gray',     90,        'crimson',  91,        'green',    92,        'yellow',   93,        'blue',     94,        'purple',   95,        'cyan',     96,    )        static esc := Chr(27)    static end := esc '[0m'        regex     := '' ; \u0438\u0442\u043e\u0433\u043e\u0432\u043e\u0435 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435    chars     := '' ; \u0441\u0442\u0440\u043e\u043a\u0430 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432    chrColors := Map()        index := 1    loop (aRegexColor.length \/ 2) {        ; `aRegexColor` - \u0432\u0445\u043e\u0434\u043d\u043e\u0439 \u043c\u0430\u0441\u0441\u0438\u0432 \u043f\u0430\u0440 \"\u0441\u0438\u043c\u0432\u043e\u043b-\u0446\u0432\u0435\u0442\"        str   := aRegexColor[index++]        color := aRegexColor[index++]            chars .= str        chrColors[str] := colors[color]  ; `colors` - HashMap \u0441 \u043f\u0430\u0440\u0430\u043c\u0438 \"color-code\"    }        if chars        regex .= '([' chars '])'    else        regex := regex.RTrim('|')            stack := []    while (pos &lt;= len) {        if !RegExMatch(msg, regex, &amp;match, pos) {            ; \u041e\u0441\u0442\u0430\u0432\u0448\u0438\u0439\u0441\u044f \u0442\u0435\u043a\u0441\u0442            clrMsg .= msg.Slice(pos)            break        }                ; \u041e\u0431\u044b\u0447\u043d\u044b\u0439 \u0442\u0435\u043a\u0441\u0442 \u043f\u0435\u0440\u0435\u0434 \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u043c \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u043c        clrMsg .= msg.Slice(pos, match.pos - pos)        ; \u0414\u0432\u0438\u0436\u0435\u043c\u0441\u044f \u0432\u043f\u0435\u0440\u0435\u0434        pos := match.pos + match.len                if (stack.Has(-1) &amp;&amp; stack[-1] = match[1]) {            clrMsg .= match[1] . end            stack.Pop()        } else {            begin  := esc '[0;' chrColors[match[1]] 'm'            clrMsg .= begin . match[1]            stack.Push(match[1])        }    }        return clrMsg}<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:87px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p><a href=\"https:\/\/www.autohotkey.com\/docs\/v2\/lib\/RegExMatch.htm\" rel=\"noopener noreferrer nofollow\">RegExMatch<\/a> \u0438\u0449\u0435\u0442 \u0441\u0438\u043c\u0432\u043e\u043b\u044b \u0438\u0437 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 <code>[\"*]<\/code>) \u0438 \u043a\u043b\u0430\u0434\u0435\u0442 \u043e\u0434\u0438\u043d \u0438\u0437 \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0445 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u0432 <code>match[1]<\/code>. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u043f\u043e \u043e\u0434\u043d\u043e\u043c\u0443 \u0441\u0438\u043c\u0432\u043e\u043b\u0443 \u0437\u0430 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u044e. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u0440\u0430\u0441\u043a\u0440\u0430\u0448\u0438\u0432\u0430\u0442\u044c \u0442\u0435\u043a\u0441\u0442 \u0432\u043d\u0443\u0442\u0440\u0438 \u043f\u0430\u0440\u043d\u044b\u0445 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432: <code>\"text and text\"<\/code>. \u0410 \u0442\u0430\u043a\u0436\u0435 \u0442\u0435\u043a\u0441\u0442 \u0432\u043d\u0443\u0442\u0440\u0438 \u044d\u0442\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442\u0430: <code>\"text *and<em>*<\/em> text\"<\/code>.<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/11e\/433\/3c5\/11e4333c56d4310312afd80f1286bbfa.gif\" width=\"1344\" height=\"474\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/11e\/433\/3c5\/11e4333c56d4310312afd80f1286bbfa.gif 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/11e\/433\/3c5\/11e4333c56d4310312afd80f1286bbfa.gif 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e \u0443 \u043d\u0430\u0441 \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u043e\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0441\u043e \u0441\u043f\u0440\u0430\u0432\u043a\u043e\u0439, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0440\u0430\u0441\u043a\u0440\u0430\u0441\u0438\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438: <code>--switches<\/code>, <code>@file<\/code>, \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0432\u0440\u043e\u0434\u0435 <code>%AhkDir%<\/code>. \u041d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u043d\u0435\u0433\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0446\u0435\u043b\u044b\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f, \u0430 \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b.<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/f88\/e91\/0fa\/f88e910fac5e59492dbf90f57a9724a2.png\" width=\"1372\" height=\"325\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/f88\/e91\/0fa\/f88e910fac5e59492dbf90f57a9724a2.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/f88\/e91\/0fa\/f88e910fac5e59492dbf90f57a9724a2.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<h4>\u041a\u043b\u044e\u0447-\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435<\/h4>\n<p>\u0412 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0432\u044b\u0448\u0435 \u043c\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u043b\u0438 \u043c\u0430\u0441\u0441\u0438\u0432 \u201c\u0441\u0438\u043c\u0432\u043e\u043b-\u0446\u0432\u0435\u0442\u201d, \u0433\u0434\u0435 <em>\u043a\u043b\u044e\u0447<\/em> &#8212; \u044d\u0442\u043e \u0441\u0438\u043c\u0432\u043e\u043b, \u0430 <em>\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435<\/em> &#8212; \u044d\u0442\u043e \u0446\u0432\u0435\u0442\u043e\u0432\u043e\u0439 \u043a\u043e\u0434:<\/p>\n<pre><code class=\"coffeescript\">msg.Color([   '\"',  'cyan',  '*',  'green'])<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0422\u0430\u043a\u043e\u0439 \u043c\u0430\u0441\u0441\u0438\u0432 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u044b\u0432\u0430\u043b\u0441\u044f \u0432 <code>chrColors<\/code>:<\/p>\n<pre><code class=\"coffeescript\">\" 96* 92<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043c\u044b \u043c\u043e\u0433\u043b\u0438 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c <code>chrColors['\"']<\/code> \u0438\u043b\u0438 <code>chrColors['*']<\/code>, \u0433\u0434\u0435 \u043a\u0430\u0436\u0434\u044b\u0439 \u0441\u0438\u043c\u0432\u043e\u043b \u0441\u043b\u0443\u0436\u0438\u043b \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u043c \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 (\u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u044b\u043c \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435\u043c, \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <code>regex<\/code>), \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u043c \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u043c (\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <code>match[1]<\/code>) \u0438 \u043a\u043b\u044e\u0447\u043e\u043c \u0432 <code>chrColors<\/code>.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u0445\u043e\u0434\u0438\u043c \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u201c\u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435-\u0446\u0432\u0435\u0442\u201d (\u0434\u043b\u044f \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0437\u0430\u0431\u0443\u0434\u0435\u043c \u043f\u0440\u043e \u0441\u0438\u043c\u0432\u043e\u043b\u044b):<\/p>\n<pre><code class=\"coffeescript\">msg.Color([  '(@(file|list\\.ini))',    'yellow',   ; list  '(mainDir|AhkDir)(?=\\=)', 'purple',   ; variables names  '(%[^%]+%)',              'blue',     ; variables values  '(\\-+[\\-\\w]+)(?=[ =])',   'cyan',     ; switches])<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041f\u0440\u0438 \u0442\u0430\u043a\u043e\u043c \u043f\u043e\u0434\u0445\u043e\u0434\u0435 \u043a\u0430\u0436\u0434\u043e\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u043e\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0441\u043b\u0443\u0436\u0438\u0442\u044c \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u043c \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u0438 \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u043c \u0442\u0435\u043a\u0441\u0442\u043e\u043c, \u0430 \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e &#8212; \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043a\u043b\u044e\u0447\u043e\u043c \u0432 <code>chrColors<\/code>.<\/p>\n<p>\u041a\u0430\u0436\u0434\u043e\u0435 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043c\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u043c \u0432 RegExMatch, \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0442\u0435\u043a\u0441\u0442. \u0421\u0430\u043c \u043f\u043e \u0441\u0435\u0431\u0435 \u043e\u043d \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0438\u0449\u0435\u0442, \u0430 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0432 \u043d\u0430\u0431\u043e\u0440 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439 \u0434\u043b\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430. \u0422\u043e \u0435\u0441\u0442\u044c \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u044b\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f &#8212; \u044d\u0442\u043e \u043d\u0435\u0447\u0442\u043e, \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0437\u0432\u0430\u0442\u044c \u043d\u0438\u0437\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u044b\u043c \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u043c\u044b\u043c \u044f\u0437\u044b\u043a\u043e\u043c, \u0433\u0434\u0435 \u043a\u0430\u0436\u0434\u044b\u0439 \u0441\u0438\u043c\u0432\u043e\u043b \u0432\u0440\u043e\u0434\u0435 <code>\\w<\/code> \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u0432 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u0443\u044e \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e.<\/p>\n<p>\u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0432\u0440\u043e\u0434\u0435 <code>(%[^%]+%)<\/code> \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u0432 \u043a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u0439\u0434\u0435\u043d \u0442\u0435\u043a\u0441\u0442 \u0432\u0440\u043e\u0434\u0435 <code>%AhkDir%<\/code>, <code>%mainDir%<\/code> \u0438 \u0442.\u0434. \u0422\u043e \u0435\u0441\u0442\u044c \u0432\u0445\u043e\u0434 (<code>(%[^%]+%)<\/code>) \u043d\u0435 \u0440\u0430\u0432\u0435\u043d \u0432\u044b\u0445\u043e\u0434\u0443 (<code>%mainDir%<\/code>) \u0438 \u043a\u0430\u043a \u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0435 &#8212; \u0442\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0441\u0430\u043c\u043e\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e\u043c \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043d\u0430\u043c \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u043b\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u043d\u0443\u0436\u043d\u044b\u0439 \u0446\u0432\u0435\u0442 \u043a \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u043e\u043c\u0443 \u0442\u0435\u043a\u0441\u0442\u0443. \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f, \u0441\u0430\u043c\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0441\u043b\u0443\u0436\u0438\u0442\u044c \u043a\u043b\u044e\u0447\u043e\u043c \u0432 <code>chrColors<\/code> \u0434\u043b\u044f \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u044f \u0446\u0432\u0435\u0442\u0430.<\/p>\n<h4>Mark<\/h4>\n<p>\u041a\u0430\u043a \u0432\u044b \u043c\u043e\u0433\u043b\u0438 \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c \u0440\u0430\u043d\u0435\u0435, \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <code>match<\/code> \u0447\u0435\u043c-\u0442\u043e \u043f\u043e\u0445\u043e\u0436\u0430 \u043d\u0430 \u043c\u0430\u0441\u0441\u0438\u0432: <code>match[0]<\/code> \u0445\u0440\u0430\u043d\u0438\u0442 \u0432\u0441\u0435 \u0447\u0442\u043e \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043d\u0430\u0439\u0442\u0438, \u0430 <code>match[1]<\/code> \u0445\u0440\u0430\u043d\u0438\u0442 \u0442\u043e, \u0447\u0442\u043e \u043d\u0430\u0448\u043b\u0430 \u0437\u0430\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u044e\u0449\u0430\u044f <em>\u0433\u0440\u0443\u043f\u043f\u0430 1<\/em>. \u041e\u0434\u043d\u0430\u043a\u043e \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u044d\u0442\u043e <strong>match \u043e\u0431\u044a\u0435\u043a\u0442<\/strong>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0445\u0440\u0430\u043d\u0438\u0442 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e <em>\u0438\u043d\u0434\u0435\u043a\u0441\u044b<\/em>, \u043d\u043e \u0438 <em>\u043f\u043e\u043b\u044f<\/em>: <code>match.pos<\/code>, <code>match.len<\/code>, <code>match.count<\/code>. \u0422\u0430\u043a\u0436\u0435 \u0443 \u043d\u0435\u0433\u043e \u0435\u0441\u0442\u044c \u043f\u043e\u043b\u0435 <code>mark<\/code>. \u041a\u043e\u0433\u0434\u0430 <code>RegExMatch()<\/code> \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u0442 \u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u0435 <a href=\"https:\/\/pcre.org\/original\/doc\/html\/pcrepattern.html#SEC27\" rel=\"noopener noreferrer nofollow\">\u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e <code>(*MARK:..)<\/code><\/a>, \u043f\u043e\u043b\u0435 <code>mark<\/code> \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e\u0441\u043b\u0435 \u0434\u0432\u043e\u0435\u0442\u043e\u0447\u0438\u044f <code>:<\/code> \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u043e\u0441\u043b\u0435 <code>(*MARK:chr)<\/code> \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <code>match.mark<\/code> \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0432\u043d\u043e <code>\"chr\"<\/code>.<\/p>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0434\u0440\u0443\u0433\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<pre><code class=\"cs\">(%[^%]+%)(*MARK:1)|(~[^~]+~)(*MARK:2)<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0445\u0432\u0430\u0447\u0435\u043d\u0430 <em>\u0433\u0440\u0443\u043f\u043f\u0430 1<\/em>, <code>match.mark<\/code> \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0432\u0435\u043d \u201c1\u201d. \u0415\u0441\u043b\u0438 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0445\u0432\u0430\u0447\u0435\u043d\u0430 <em>\u0433\u0440\u0443\u043f\u043f\u0430 2<\/em>, <code>match.mark<\/code> \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0432\u0435\u043d \u201c2\u201d.<\/p>\n<p>\u041c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u0443 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0434\u043b\u044f \u043c\u0430\u0440\u043a\u0438\u0440\u043e\u0432\u043a\u0438 (\u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0446\u0438\u0438) \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432: 1, 2, 3, \u2026 \u041a\u0430\u0436\u0434\u044b\u0439 \u0448\u0430\u0431\u043b\u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 <em>mark<\/em>, \u0442\u043e \u0435\u0441\u0442\u044c \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043b\u044e\u0447 \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0442\u044c \u0446\u0432\u0435\u0442 \u0438\u0437 <code>chrColors<\/code>:<\/p>\n<pre><code class=\"coffeescript\">begin  := esc '[0;' chrColors[match.mark] 'm'clrMsg .= begin . match[1]<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u043a\u043e\u043d\u0435\u0446 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u0438\u0437 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 <code>aRegexColor<\/code> <em>mark<\/em> \u0441 \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u043c, \u0430 \u0437\u0430\u0442\u0435\u043c \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u0432\u0441\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u044b \u0432 \u0435\u0434\u0438\u043d\u043e\u0435 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 OR <code>|<\/code><\/p>\n<pre><code class=\"coffeescript\">regex     := '' ; \u0438\u0442\u043e\u0433\u043e\u0432\u043e\u0435 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435    chars     := ''    ; \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0438\u0442\u043e\u0433\u043e\u0432\u043e\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0441 \u0441\u0438\u043c\u0432\u043e\u043b\u0430\u043c\u0438    chrColors := Map()        index     := 1; \u0438\u043d\u0434\u0435\u043a\u0441 \u043c\u0430\u0441\u0441\u0438\u0432\u0430    idxColor  := 1  ; \u0438\u043d\u0434\u0435\u043a\u0441 \u0434\u043b\u044f mark        loop (aRegexColor.length \/ 2) {        str   := aRegexColor[index++]        color := aRegexColor[index++]        if (str.length = 1) {            ; \u0421\u0438\u043c\u0432\u043e\u043b\u044b \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u044e\u0442\u0441\u044f \u0432 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0432\u0438\u0434\u0430 [..]            chars .= str            chrColors[str] := colors[color]; \u0441\u0438\u043c\u0432\u043e\u043b-\u043a\u043e\u0434        } else {            ; \u0428\u0430\u0431\u043b\u043e\u043d\u044b \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u044e\u0442\u0441\u044f \u0432 \u043e\u0434\u0438\u043d \u0431\u043e\u043b\u044c\u0448\u043e\u0439            regex .= str '(*MARK:' idxColor ')|'             chrColors[String(idxColor++)] := colors[color]; \u0438\u043d\u0434\u0435\u043a\u0441-\u043a\u043e\u0434        }    }        if chars        regex .= '([' chars '])(*MARK:chr)' ; \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u0438\u043c\u0432\u043e\u043b\u044b \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0432 \u043a\u043e\u043d\u0435\u0446    else        regex := regex.RTrim('|'); \u0443\u0434\u0430\u043b\u044f\u0435\u043c \u043b\u0438\u0448\u043d\u0438\u0439 OR |<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u043e\u0434\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0432\u0440\u043e\u0434\u0435 <code>(..)(*MARK:1)|(..)(*MARK:2)|...|([..])(*MARK:chr)<\/code>. \u0414\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0432\u0441\u044e \u0442\u0443 \u0436\u0435 HashMap, \u0412 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0435\u0441\u0442\u044c \u043f\u0430\u0440\u044b \u201c\u0438\u043d\u0434\u0435\u043a\u0441-\u043a\u043e\u0434\u201d \u0438 \u0443\u0436\u0435 \u0437\u043d\u0430\u043a\u043e\u043c\u044b\u0435 \u043d\u0430\u043c \u043f\u0430\u0440\u044b \u201c\u0441\u0438\u043c\u0432\u043e\u043b-\u043a\u043e\u0434\u201d:<\/p>\n<ol>\n<li>\n<p>\u0412\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f: \u043a\u043b\u044e\u0447 <code>match.mark<\/code> (\u0438\u043d\u0434\u0435\u043a\u0441).<\/p>\n<\/li>\n<li>\n<p>\u0421\u0438\u043c\u0432\u043e\u043b\u044b: \u043a\u043b\u044e\u0447 \u0441\u0430\u043c \u0441\u0438\u043c\u0432\u043e\u043b <code>match[1]<\/code>.<\/p>\n<\/li>\n<\/ol>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f (<em>\u0441\u0438\u043c\u0432\u043e\u043b<\/em> \u0438\u043b\u0438 <em>\u0438\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439<\/em>) \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0440\u0430\u0437\u043d\u044b\u0439 \u043a\u043b\u044e\u0447, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c <em>\u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0441 \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u043c<\/em> \u043e\u0442 <em>\u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0441 \u0441\u0438\u043c\u0432\u043e\u043b\u0430\u043c\u0438<\/em> \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>(*MARK:chr)<\/code>:<\/p>\n<pre><code class=\"coffeescript\">        if (match.mark != 'chr') {            ; \u0418\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0448\u0430\u0431\u043b\u043e\u043d: \u043e\u0431\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u0432 \u0446\u0432\u0435\u0442            begin  := esc '[0;' chrColors[match.mark] 'm'            clrMsg .= begin . match[1] . end            continue        }        ; \u041f\u0430\u0440\u043d\u044b\u0439 \u0441\u0438\u043c\u0432\u043e\u043b        if (stack.Has(-1) &amp;&amp; stack[-1] = match[1]) {            clrMsg .= end            stack.Pop()        } else {            begin  := esc '[0;' chrColors[match[1]] 'm'            clrMsg .= begin            stack.Push(match[1])        }<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<h4>Branch Reset<\/h4>\n<p>\u0423 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0433\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0435\u0441\u0442\u044c \u043a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u043a: \u043e\u043d\u043e \u0438\u043c\u0435\u0435\u0442 \u043c\u043d\u043e\u0433\u043e \u0437\u0430\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u044e\u0449\u0438\u0445 \u0433\u0440\u0443\u043f\u043f. \u041a\u0430\u043a \u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0435, \u043a\u0430\u0436\u0434\u044b\u0439 \u0437\u0430\u0445\u0432\u0430\u0447\u0435\u043d\u043d\u044b\u0439 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u0442\u0435\u043a\u0441\u0442\u0430 \u0431\u0443\u0434\u0435\u0442 \u0441\u0432\u044f\u0437\u0430\u043d \u0441\u043e \u0441\u0432\u043e\u0435\u0439 \u0437\u0430\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u044e\u0449\u0435\u0439 \u0433\u0440\u0443\u043f\u043f\u043e\u0439: 1, 2, \u2026<\/p>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u043a\u043e\u0434\u0430:<\/p>\n<pre><code class=\"coffeescript\">\"%variable% is ~gray~\".Color([    '(%[^%]+%)', 'blue',     '(~[^~]+~)', 'gray'])<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p><code>Color<\/code> \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435:<\/p>\n<pre><code class=\"cs\">(%[^%]+%)(*MARK:1)|(~[^~]+~)(*MARK:2)<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0412 \u043d\u0435\u043c 2 \u0437\u0430\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u044e\u0449\u0438\u0435 \u0433\u0440\u0443\u043f\u043f\u044b:<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th data-colwidth=\"106\" width=\"106\">\n<p align=\"left\">\u0418\u043d\u0434\u0435\u043a\u0441<\/p>\n<\/th>\n<th data-colwidth=\"124\" width=\"124\">\n<p align=\"left\">\u0413\u0440\u0443\u043f\u043f\u0430<\/p>\n<\/th>\n<th>\n<p align=\"left\">\u0422\u0435\u043a\u0441\u0442<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td data-colwidth=\"106\" width=\"106\">\n<p align=\"left\">1<\/p>\n<\/td>\n<td data-colwidth=\"124\" width=\"124\">\n<p align=\"left\">(%[^%]+%)<\/p>\n<\/td>\n<td>\n<p align=\"left\">%variable%<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"106\" width=\"106\">\n<p align=\"left\">2<\/p>\n<\/td>\n<td data-colwidth=\"124\" width=\"124\">\n<p align=\"left\">(~[^~]+~)<\/p>\n<\/td>\n<td>\n<p align=\"left\">~gray~<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0434\u043b\u044f \u0442\u0435\u043a\u0441\u0442\u0430 <code>~gray~<\/code> \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043b\u0435\u0436\u0438\u0442 \u0432 <code>match[2]<\/code>, \u0430 <code>match[1]<\/code> (\u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0432 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0435) \u043f\u0443\u0441\u0442. \u0422\u043e \u0435\u0441\u0442\u044c \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0437\u043d\u0430\u0442\u044c \u0438\u043d\u0434\u0435\u043a\u0441 \u0433\u0440\u0443\u043f\u043f\u044b \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0442\u0435\u043a\u0441\u0442. \u0410 \u0435\u0441\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043f\u0435\u0440\u0435\u0434\u0430\u043b \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u0448\u0430\u0431\u043b\u043e\u043d\u0435 \u0435\u0449\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0433\u0440\u0443\u043f\u043f, \u0432\u0440\u043e\u0434\u0435 <code>=(%([^@](\\w+))%)<\/code> \u0442\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0438\u043d\u0434\u0435\u043a\u0441 \u0431\u0443\u0434\u0435\u0442 \u0441\u043b\u043e\u0436\u043d\u043e. \u0410 \u043c\u044b \u0445\u043e\u0442\u0438\u043c, \u0447\u0442\u043e\u0431\u044b \u0442\u0435\u043a\u0441\u0442 \u0438\u043b\u0438 \u0441\u0438\u043c\u0432\u043e\u043b \u0432\u0441\u0435\u0433\u0434\u0430 \u043b\u0435\u0436\u0430\u043b \u0432 <code>match[1]<\/code>.<\/p>\n<p>\u0414\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 <a href=\"https:\/\/pcre.org\/original\/doc\/html\/pcrepattern.html#TOC1\" rel=\"noopener noreferrer nofollow\">Branch Reset<\/a>. Branch Reset \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e \u0432\u0438\u0434\u0430 <code>(?|..)<\/code>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0434\u0435\u043b\u0430\u0435\u0442 \u0438\u043d\u0434\u0435\u043a\u0441 \u043a\u0430\u0436\u0434\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u044b \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c. \u0415\u0441\u043b\u0438 \u043c\u044b \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043c \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 <code>()|()|...<\/code> \u043a\u0430\u043a \u0441\u043f\u0438\u0441\u043e\u043a \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432, \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0445 <code>|<\/code>, \u0442\u043e \u0438\u043d\u0434\u0435\u043a\u0441 \u043a\u0430\u0436\u0434\u043e\u0439 \u0437\u0430\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u044e\u0449\u0435\u0439 \u0433\u0440\u0443\u043f\u043f\u044b \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430:<\/p>\n<pre><code class=\"coffeescript\">( () )|( () () )1  2   1  2  3 <\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0422\u043e \u0435\u0441\u0442\u044c \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c \u043d\u0435 \u0432\u0441\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0446\u0435\u043b\u0438\u043a\u043e\u043c, \u0430 \u0435\u0433\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b, \u0430 \u0437\u0430 \u0442\u0435\u043c \u0433\u0440\u0443\u043f\u043f\u044b \u0432\u043d\u0443\u0442\u0440\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432. \u0411\u0435\u0437 Branch Reset \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0446\u0438\u044f \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u0430\u044f:<\/p>\n<pre><code class=\"coffeescript\">( () )|( () () )1  2   3  4  5 <\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041e\u0431\u0435\u0440\u043d\u0435\u043c \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0432 <code>(?|..)<\/code>:<\/p>\n<pre><code class=\"cs\">(?|(%[^%]+%)(*MARK:1)|(~[^~]+~)(*MARK:2))<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0412\u0430\u0436\u043d\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c, \u0447\u0442\u043e <code>(?|..)<\/code> &#8212; \u043d\u0435 \u0437\u0430\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u044e\u0449\u0430\u044f \u0433\u0440\u0443\u043f\u043f\u0430, \u0430 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u201cBranch Reset\u201d. \u0418 <code>(*MARK:..)<\/code> &#8212; \u201c\u0433\u043b\u0430\u0433\u043e\u043b\u201d (<strong>verb<\/strong>). \u0421\u043a\u043e\u0431\u043a\u0438 \u043b\u0438\u0448\u044c \u0447\u0430\u0441\u0442\u044c \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u0430.<\/p>\n<p>\u0412 \u0438\u0442\u043e\u0433\u0435 \u0443 \u043d\u0430\u0441 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0446\u0438\u044f:<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th data-colwidth=\"90\" width=\"90\">\n<p align=\"left\">\u0418\u043d\u0434\u0435\u043a\u0441<\/p>\n<\/th>\n<th data-colwidth=\"74\" width=\"74\">\n<p align=\"left\">Mark<\/p>\n<\/th>\n<th data-colwidth=\"116\" width=\"116\">\n<p align=\"left\">\u0413\u0440\u0443\u043f\u043f\u0430<\/p>\n<\/th>\n<th>\n<p align=\"left\">\u0422\u0435\u043a\u0441\u0442<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td data-colwidth=\"90\" width=\"90\">\n<p align=\"left\">1<\/p>\n<\/td>\n<td data-colwidth=\"74\" width=\"74\">\n<p align=\"left\">1<\/p>\n<\/td>\n<td data-colwidth=\"116\" width=\"116\">\n<p align=\"left\">(%[^%]+%)<\/p>\n<\/td>\n<td>\n<p align=\"left\">%variable%<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"90\" width=\"90\">\n<p align=\"left\">1<\/p>\n<\/td>\n<td data-colwidth=\"74\" width=\"74\">\n<p align=\"left\">2<\/p>\n<\/td>\n<td data-colwidth=\"116\" width=\"116\">\n<p align=\"left\">(~[^~]+~)<\/p>\n<\/td>\n<td>\n<p align=\"left\">~gray~<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u0412 <code>match[1]<\/code> \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u043b\u0435\u0436\u0430\u0442\u044c \u0437\u0430\u0445\u0432\u0430\u0447\u0435\u043d\u043d\u044b\u0439 \u0442\u0435\u043a\u0441\u0442 \u0438\u0437 1-\u0439, 2-\u0439 \u0438\u043b\u0438 3-\u0439 \u0433\u0440\u0443\u043f\u043f\u044b. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c <code>match.mark<\/code> \u0431\u0443\u0434\u0435\u0442 \u043f\u043e-\u043f\u0440\u0435\u0436\u043d\u0435\u043c\u0443 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441:<\/p>\n<pre><code class=\"coffeescript\">    if chars        regex .= '([' chars '])(*MARK:chr)'    else        regex := regex.RTrim('|')    regex := '(?|' regex ')'<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<h4>\u041f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0446\u0432\u0435\u0442\u043e\u0432<\/h4>\n<p>\u0412 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0430\u0448 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u0431\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u0442 \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0439 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u0442\u0435\u043a\u0441\u0442\u0430 \u0432 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u0438 \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u0446\u0432\u0435\u0442:<\/p>\n<pre><code class=\"coffeescript\">     static esc := Chr(27)     static end := esc '[0m'         if (match.mark != 'chr') {            ; \u0418\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0448\u0430\u0431\u043b\u043e\u043d: \u043e\u0431\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u0432 \u0446\u0432\u0435\u0442            begin  := esc '[0;' chrColors[match.mark] 'm'            clrMsg .= begin . match[1] . end            continue        }<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e, \u043a\u0430\u043a \u0432\u044b \u043f\u043e\u043c\u043d\u0438\u0442\u0435 \u0438\u0437 <a href=\"https:\/\/habr.com\/ru\/articles\/1054876\/\" rel=\"noopener noreferrer nofollow\">\u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0447\u0430\u0441\u0442\u0438<\/a>, \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u201c\u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u044e\u0442\u201d \u0446\u0432\u0435\u0442\u0430:<\/p>\n<pre><code class=\"powershell\">\\e[96m\"  &lt;- \u0441\u0432\u043e\u0439 \u0446\u0432\u0435\u0442# \u0443\u0440\u043e\u0432\u0435\u043d\u044c 1text    \\e[92m*    &lt;- \u0441\u0432\u043e\u0439 \u0446\u0432\u0435\u0442   # \u0443\u0440\u043e\u0432\u0435\u043d\u044c 2    and    *\\e[96m    &lt;- \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0439 \u0446\u0432\u0435\u0442   text\"\\e[0m   &lt;- \u043d\u0435\u0442 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0433\u043e \u0446\u0432\u0435\u0442\u0430<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0417\u0430\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u0446\u0432\u0435\u0442 \u043a\u0430\u0436\u0434\u043e\u0439 \u043f\u0430\u0440\u044b \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0443\u0440\u043e\u0432\u043d\u044f \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u044d\u0442\u043e\u0439 \u043f\u0430\u0440\u044b. \u0418\u043c\u0435\u043d\u043d\u043e \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0441\u0442\u0435\u043a, \u0447\u0442\u043e\u0431\u044b \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c, \u043a\u0430\u043a\u043e\u0439 \u0446\u0432\u0435\u0442 \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u0432 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442: \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0438\u0439 (\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <code>begin<\/code>) \u0438\u043b\u0438 \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0438\u0439 <code>\\e[0m<\/code> (\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <code>end<\/code>).<\/p>\n<p>\u0412 \u0442\u0435\u043a\u0443\u0449\u0435\u043c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0435 \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u0446\u0432\u0435\u0442 \u043d\u0438 \u043e\u0442 \u0447\u0435\u0433\u043e \u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u0442, \u043e\u043d \u0432\u0441\u0435\u0433\u0434\u0430 \u0441\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u0442 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0446\u0432\u0435\u0442 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043d\u0430 \u0431\u0435\u043b\u044b\u0439 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>\\e[0m<\/code>. <\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/660\/b70\/9ce\/660b709cec050b18357a5f8219610d42.gif\" width=\"805\" height=\"434\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/660\/b70\/9ce\/660b709cec050b18357a5f8219610d42.gif 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/660\/b70\/9ce\/660b709cec050b18357a5f8219610d42.gif 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u0435\u0435 \u0431\u044b\u043b\u043e \u0431\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c, \u043d\u0430\u0445\u043e\u0434\u0438\u043c\u0441\u044f \u043b\u0438 \u043c\u044b \u0432\u043d\u0443\u0442\u0440\u0438 \u043f\u0430\u0440\u044b \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 <code>\" \"<\/code>) \u0438 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0446\u0432\u0435\u0442 \u043d\u0430 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0439, \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 \u043f\u0430\u0440\u043d\u044b\u043c \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u043c, \u0430 \u043d\u0435 \u043d\u0430 <code>\\e[0m<\/code>:<\/p>\n<pre><code class=\"coffeescript\">        if (match.mark != 'chr') {            ; \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u0446\u0432\u0435\u0442 \u0431\u0435\u0440\u0435\u043c \u0438\u0437 chrColors            begin  := esc '[0;' chrColors[match.mark] 'm'            if (stack.Has(-1)) {                ; \u0432\u043d\u0443\u0442\u0440\u0438 \u043f\u0430\u0440\u044b - \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u0446\u0432\u0435\u0442 \u0438\u0449\u0435\u043c \u043f\u043e \"\u043a\u043b\u044e\u0447\u0443\" \u0441\u043e \u0441\u0442\u0435\u043a\u0430                _end := esc '[0;' chrColors[stack[-1]] 'm'                clrMsg .= begin . match[1] . _end            } else {                ; \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u0439 - \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u0446\u0432\u0435\u0442                clrMsg .= begin . match[1] . end            }            continue        }<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c1d\/5b3\/019\/c1d5b3019bb31d5ed1c3498019ffe9d5.gif\" width=\"800\" height=\"319\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c1d\/5b3\/019\/c1d5b3019bb31d5ed1c3498019ffe9d5.gif 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c1d\/5b3\/019\/c1d5b3019bb31d5ed1c3498019ffe9d5.gif 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u0412 \u0438\u0442\u043e\u0433\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c, <a href=\"https:\/\/github.com\/JoyHak\/Launcher\/blob\/e666e853253b6627bd6767a743ad3f47a557bcf6\/Lib\/output.ahk#L1\" rel=\"noopener noreferrer nofollow\">\u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u043d\u0430 GitHub<\/a>:<\/p>\n<pre><code class=\"coffeescript\">; \u041e\u0431\u044a\u044f\u0432\u0438\u043c \u0434\u043e\u043f. \u043c\u0435\u0442\u043e\u0434 \u0434\u043b\u044f \u0447\u0438\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438({}.DefineProp)(String.prototype, 'Match', {call: RegExMatch})Color(msg, aRegexColor) {; \u0418\u043c\u0435\u043d\u0438 \u0446\u0432\u0435\u0442\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0432\u0443\u0435\u0442 \u0446\u0432\u0435\u0442\u043e\u0432\u043e\u0439 \u043a\u043e\u0434    static colors := Map(        'black',    30,        'red',      31,        'orange',   33,        'magenta',  35,        'gray',     90,        'crimson',  91,        'green',    92,        'yellow',   93,        'blue',     94,        'purple',   95,        'cyan',     96,    )        ; \u041a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b    static esc := Chr(27)    static end := esc '[0m'; \u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u043c \u0432\u0445\u043e\u0434\u043d\u043e\u0439 \u043c\u0430\u0441\u0441\u0438\u0432    regex     := ''    chars     := ''    chrColors := Map()    chrColors.capacity := aRegexColor.capacity        index     := 1    ; \u0438\u043d\u0434\u0435\u043a\u0441 \u043c\u0430\u0441\u0441\u0438\u0432\u0430    idxColor  := 1    ; \u0438\u043d\u0434\u0435\u043a\u0441 mark        loop (aRegexColor.length \/ 2) {        str   := aRegexColor[index++]        color := aRegexColor[index++]        if (str.length = 1) {            ; \u0421\u0438\u043c\u0432\u043e\u043b\u044b \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0435\u043c \u0432 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e [..]            chars .= str            chrColors[str] := colors[color]    ; \u0441\u0438\u043c\u0432\u043e\u043b-\u0446\u0432\u0435\u0442        } else {            ; \u0410\u0442\u043e\u043c\u0430\u0440\u043d\u044b\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u044b \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0435\u043c \u0447\u0435\u0440\u0435\u0437 OR |            regex .= str '(*MARK:' idxColor ')|'             chrColors[String(idxColor++)] := colors[color]    ; \u0438\u043d\u0434\u0435\u043a\u0441-\u0446\u0432\u0435\u0442        }    }        if chars        regex .= '([' chars '])(*MARK:chr)'    else        regex := regex.RTrim('|')            ; \u041f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c Branch Reset \u043a \u043a\u0430\u0436\u0434\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u0435    regex := options '(?|' regex ')'            ; \u0420\u0430\u0441\u043a\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u043c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435    pos := 1    len := msg.length    clrMsg := ''        stack := []    stack.capacity := aRegexColor.capacity * 2    while (pos &lt;= len) {        if !msg.Match(regex, &amp;match, pos) {            ; \u041e\u0441\u0442\u0430\u0432\u0448\u0438\u0439\u0441\u044f \u0442\u0435\u043a\u0441\u0442            clrMsg .= msg.Slice(pos)            break        }                ; \u041e\u0431\u044b\u0447\u043d\u044b\u0439 \u0442\u0435\u043a\u0441\u0442 \u043f\u0435\u0440\u0435\u0434 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u043e\u043c        clrMsg .= msg.Slice(pos, match.pos - pos)        ; \u0414\u0432\u0438\u0436\u0435\u043c\u0441\u044f \u0432\u043f\u0435\u0440\u0435\u0434        pos    := match.pos + match.len                if (match.mark != 'chr') {            ; \u0410\u0442\u043e\u043c\u0430\u0440\u043d\u044b\u0439 \u0448\u0430\u0431\u043b\u043e\u043d.            ; \u041e\u0442\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u0446\u0432\u0435\u0442 \u0431\u0435\u0440\u0435\u043c \u0438\u0437 chrColors            begin  := esc '[0;' chrColors[match.mark] 'm'            if (stack.Has(-1)) {                ; \u0412\u043d\u0443\u0442\u0440\u0438 \u043f\u0430\u0440\u044b - \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u0446\u0432\u0435\u0442 \u0438\u0449\u0435\u043c \u043f\u043e \"\u043a\u043b\u044e\u0447\u0443\" \u0441\u043e \u0441\u0442\u0435\u043a\u0430                _end := esc '[0;' chrColors[stack[-1]] 'm'                clrMsg .= begin . match[1] . _end            } else {                ; \u041d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u0439 - \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u0446\u0432\u0435\u0442                clrMsg .= begin . match[1] . end            }            continue        }        ; \u041f\u0430\u0440\u043d\u044b\u0439 \u0448\u0430\u0431\u043b\u043e\u043d (\u0441\u0438\u043c\u0432\u043e\u043b)        if (stack.Has(-1) &amp;&amp; stack[-1] = match[1]) {            ; \u041d\u0430\u0448\u043b\u0438 \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u044e\u0449\u0438\u0439 \u043f\u0430\u0440\u0443 \u0441\u0438\u043c\u0432\u043e\u043b.             ; \u0417\u0430\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u0446\u0432\u0435\u0442            clrMsg .= end            stack.Pop()        } else {            ; \u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u0441\u043e\u043e\u0442\u0432. \u043f\u0430\u0440\u0435 \u0446\u0432\u0435\u0442            begin  := esc '[0;' chrColors[match[1]] 'm'            clrMsg .= begin            stack.Push(match[1])        }    }        return clrMsg}<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u044d\u0442\u043e\u0442 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c, \u0447\u0442\u043e\u0431\u044b <a href=\"https:\/\/github.com\/JoyHak\/Launcher\/blob\/4c3f2ac4729f54c35f60068ebbcab8d534178b4d\/launcher.ahk#L9\" rel=\"noopener noreferrer nofollow\">\u0440\u0430\u0441\u043a\u0440\u0430\u0441\u0438\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0441\u043e \u0441\u043f\u0440\u0430\u0432\u043a\u043e\u0439<\/a>, \u0441 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u044b \u043d\u0430\u0447\u0438\u043d\u0430\u043b\u0438 \u0432 <a href=\"https:\/\/habr.com\/ru\/articles\/1053046\/\" rel=\"noopener noreferrer nofollow\">\u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438<\/a>:<\/p>\n<pre><code class=\"javascript\">PrintHelp(*) {; ...    msg :=       msg.Color([        '(@(file|list\\.ini))',    'yellow',   ; list        '(mainDir|AhkDir)(?=\\=)', 'purple',   ; variables names        '(%[^%]+%)',              'blue',     ; variables values        '(\\-+[\\-\\w]+)(?=[ =])',   'cyan',     ; switches        '\\*\\*([^\\*]+)\\*\\*',       'crimson',          '__([^_]+)__',            'magenta',          '~',                      'gray',        '``',                     'green',         '#',                      'orange'      ]).Print()}<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/fbe\/7fe\/13b\/fbe7fe13b0cff3e6aeab9e98709964d0.png\" width=\"1015\" height=\"985\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/fbe\/7fe\/13b\/fbe7fe13b0cff3e6aeab9e98709964d0.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/fbe\/7fe\/13b\/fbe7fe13b0cff3e6aeab9e98709964d0.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<h4>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h4>\n<p><a href=\"https:\/\/habr.com\/ru\/articles\/545150\/\" rel=\"noopener noreferrer nofollow\">\u0420\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u044b\u0435 \u0412\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f<\/a> &#8212; \u0432\u0435\u0441\u044c\u043c\u0430 \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0430 \u0442\u0435\u043a\u0441\u0442\u0430, \u043f\u0443\u0441\u0442\u044c \u0438 \u043d\u0435 \u0441\u0430\u043c\u044b\u0439 \u0447\u0438\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u044b\u0439. \u041e\u043d\u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u043d\u0430\u043c \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u044b \u0442\u0435\u043a\u0441\u0442\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043d\u0438\u0437\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u043e\u0433\u043e \u043a\u043e\u0434\u0430, \u0438 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0438\u0445 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0432\u044b\u0441\u043e\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430 <a href=\"https:\/\/www.autohotkey.com\/docs\/v2\/Language.htm\" rel=\"noopener noreferrer nofollow\">AutoHotkey<\/a>.<\/p>\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0443\u0432\u0438\u0434\u0435\u043b\u0438, \u0447\u0442\u043e \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u044b\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043e\u0431\u043b\u0430\u0434\u0430\u044e\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u043c\u0438 \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0439\u0434\u0435\u043d\u043d\u043e\u0433\u043e \u043f\u0443\u0442\u0438 \u0438 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0440\u0435\u0444\u043b\u0435\u043a\u0441\u0438\u0435\u0439. \u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u044d\u0442\u0438\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u043c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u043c\u043e\u0433\u043b\u0438 \u0438\u0445 \u0441 \u0431\u043e\u043b\u044c\u0448\u0435\u0439 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c\u044e \u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043b\u0430\u043a\u043e\u043d\u0438\u0447\u043d\u044b\u0439 \u0438 \u0447\u0438\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u044b\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c.<\/p>\n<p>\u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u043f\u0430\u0440\u0441\u0438\u043d\u0433 \u0442\u0435\u043a\u0441\u0442\u0430 \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u043c \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0443 \u044f\u0437\u044b\u043a\u043e\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e AutoHotkey \u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u044f\u0437\u044b\u043a \u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. <a href=\"https:\/\/github.com\/JoyHak?tab=repositories\" rel=\"noopener noreferrer nofollow\">\u0417\u0430\u0433\u043b\u044f\u0434\u044b\u0432\u0430\u0439\u0442\u0435 \u043d\u0430 \u043c\u043e\u0439 GitHub<\/a>, \u0435\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 AutoHotkey \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435.<\/p>\n<\/div>\n<p>\u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/1057658\/\">https:\/\/habr.com\/ru\/articles\/1057658\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0435\u0440\u0438\u0438 \u0441\u0442\u0430\u0442\u0435\u0439 \u043c\u044b \u043f\u043e\u0433\u0440\u0443\u0436\u0430\u0435\u043c\u0441\u044f \u0432 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u044f\u0437\u044b\u043a\u0430 AutoHotkey \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0432\u044b\u0432\u043e\u0434\u0430 \u0446\u0432\u0435\u0442\u043d\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442\u0430 \u0432 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b \u0434\u043b\u044f \u0443\u0442\u0438\u043b\u0438\u0442\u044b Launcher.\u0427\u0430\u0441\u0442\u044c 1: \u041d\u0430\u0438\u0432\u043d\u044b\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0438 \u0435\u0433\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u0427\u0430\u0441\u0442\u044c 2: \u0423\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0427\u0430\u0441\u0442\u044c 3: \u0410\u0442\u043e\u043c\u0430\u0440\u043d\u044b\u0435 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u044b\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f (\u0432\u044b \u0437\u0434\u0435\u0441\u044c) \u0427\u0430\u0441\u0442\u044c 4: \u0414\u0435\u043a\u043b\u0430\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0427\u0430\u0441\u0442\u044c 5: 256 \u0446\u0432\u0435\u0442\u043e\u0432 \u0438 \u0441\u0442\u0438\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0442\u0435\u043a\u0441\u0442\u0430\u0412 \u043f\u0440\u043e\u0448\u043b\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u043c\u044b \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043b\u0438\u0441\u044c \u0441 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u043c\u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044f\u043c\u0438 \u0438 \u043d\u0430\u0443\u0447\u0438\u043b\u0438\u0441\u044c \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u0438\u0445 \u0432 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0435 \u0434\u043b\u044f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0446\u0432\u0435\u0442\u0430 \u0442\u0435\u043a\u0441\u0442\u0430. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c\u0441\u044f \u0432 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u0445 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0442 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0446\u0432\u0435\u0442 \u0446\u0435\u043b\u043e\u0433\u043e \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0430 \u0442\u0435\u043a\u0441\u0442\u0430.\u0415\u0441\u043b\u0438 \u0432\u044b \u043d\u0435 \u0437\u043d\u0430\u043a\u043e\u043c\u044b \u0441 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u044b\u043c\u0438 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f\u043c\u0438 \u043d\u0430 \u0431\u0430\u0437\u043e\u0432\u043e\u043c \u0443\u0440\u043e\u0432\u043d\u0435, \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u044d\u0442\u0443 \u0441\u0442\u0430\u0442\u044c\u044e. \u0415\u0441\u043b\u0438 \u0432\u044b \u043d\u0435 \u0437\u043d\u0430\u043a\u043e\u043c\u044b \u0441 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u043e\u043c AutoHotkey, \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u043f\u0435\u0440\u0432\u0443\u044e \u0447\u0430\u0441\u0442\u044c. \u041e\u0434\u043d\u0430\u043a\u043e \u0434\u043b\u044f \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u044d\u0442\u043e \u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e ;)\u0421\u0442\u0440\u043e\u0438\u043c \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f\u041f\u0430\u0440\u043d\u044b\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b\u0412 \u043f\u0440\u043e\u0448\u043b\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u043c\u044b \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0438 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u0430\u0440 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432: &#187; &#187; \u0438\u043b\u0438 * *. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u044b\u0439 \u043c\u0430\u0441\u0441\u0438\u0432  aRegexColor \u0438\u0437 \u043f\u0430\u0440 \u201c\u0441\u0438\u043c\u0432\u043e\u043b-\u0446\u0432\u0435\u0442\u201d, \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u043c \u0435\u0433\u043e \u0432 HashMap chrColors \u0441 \u043f\u0430\u0440\u0430\u043c\u0438 \u201c\u0441\u0438\u043c\u0432\u043e\u043b-\u043a\u043e\u0434\u201d, \u0430 \u0437\u0430\u0442\u0435\u043c \u0438\u0449\u0435\u043c \u043a\u0430\u0436\u0434\u0443\u044e \u043f\u0430\u0440\u0443 \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043f\u0435\u0440\u0435\u0434 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0438\u043c \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u043c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0435\u043c\u0443 \u0441\u0438\u043c\u0432\u043e\u043b \u0438\u0437 chrColors:Color(msg, aRegexColor) {    static colors := Map(        &#8216;black&#8217;,    30,        &#8216;red&#8217;,      31,        &#8216;orange&#8217;,   33,        &#8216;magenta&#8217;,  35,        &#8216;gray&#8217;,     90,        &#8216;crimson&#8217;,  91,        &#8216;green&#8217;,    92,        &#8216;yellow&#8217;,   93,        &#8216;blue&#8217;,     94,        &#8216;purple&#8217;,   95,        &#8216;cyan&#8217;,     96,    )        static esc := Chr(27)    static end := esc &#8216;[0m&#8217;        regex     := &#187; ; \u0438\u0442\u043e\u0433\u043e\u0432\u043e\u0435 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435    chars     := &#187; ; \u0441\u0442\u0440\u043e\u043a\u0430 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432    chrColors := Map()        index := 1    loop (aRegexColor.length \/ 2) {        ; `aRegexColor` &#8212; \u0432\u0445\u043e\u0434\u043d\u043e\u0439 \u043c\u0430\u0441\u0441\u0438\u0432 \u043f\u0430\u0440 &#171;\u0441\u0438\u043c\u0432\u043e\u043b-\u0446\u0432\u0435\u0442&#187;        str   := aRegexColor[index++]        color := aRegexColor[index++]            chars .= str        chrColors[str] := colors[color]  ; `colors` &#8212; HashMap \u0441 \u043f\u0430\u0440\u0430\u043c\u0438 &#171;color-code&#187;    }        if chars        regex .= &#8216;([&#8216; chars &#8216;])&#8217;    else        regex := regex.RTrim(&#8216;|&#8217;)            stack := []    while (pos &lt;= len) {        if !RegExMatch(msg, regex, &amp;match, pos) {            ; \u041e\u0441\u0442\u0430\u0432\u0448\u0438\u0439\u0441\u044f \u0442\u0435\u043a\u0441\u0442            clrMsg .= msg.Slice(pos)            break        }                ; \u041e\u0431\u044b\u0447\u043d\u044b\u0439 \u0442\u0435\u043a\u0441\u0442 \u043f\u0435\u0440\u0435\u0434 \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u043c \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u043c        clrMsg .= msg.Slice(pos, match.pos &#8212; pos)        ; \u0414\u0432\u0438\u0436\u0435\u043c\u0441\u044f \u0432\u043f\u0435\u0440\u0435\u0434        pos := match.pos + match.len                if (stack.Has(-1) &amp;&amp; stack[-1] = match[1]) {            clrMsg .= match[1] . end            stack.Pop()        } else {            begin  := esc &#8216;[0;&#8217; chrColors[match[1]] &#8216;m&#8217;            clrMsg .= begin . match[1]            stack.Push(match[1])        }    }        return clrMsg}RegExMatch \u0438\u0449\u0435\u0442 \u0441\u0438\u043c\u0432\u043e\u043b\u044b \u0438\u0437 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 [&#171;*]) \u0438 \u043a\u043b\u0430\u0434\u0435\u0442 \u043e\u0434\u0438\u043d \u0438\u0437 \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0445 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u0432 match[1]. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u043f\u043e \u043e\u0434\u043d\u043e\u043c\u0443 \u0441\u0438\u043c\u0432\u043e\u043b\u0443 \u0437\u0430 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u044e. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u0440\u0430\u0441\u043a\u0440\u0430\u0448\u0438\u0432\u0430\u0442\u044c \u0442\u0435\u043a\u0441\u0442 \u0432\u043d\u0443\u0442\u0440\u0438 \u043f\u0430\u0440\u043d\u044b\u0445 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432: &#171;text and text&#187;. \u0410 \u0442\u0430\u043a\u0436\u0435 \u0442\u0435\u043a\u0441\u0442 \u0432\u043d\u0443\u0442\u0440\u0438 \u044d\u0442\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442\u0430: &#171;text *and* text&#187;.\u041e\u0434\u043d\u0430\u043a\u043e \u0443 \u043d\u0430\u0441 \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u043e\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0441\u043e \u0441\u043f\u0440\u0430\u0432\u043a\u043e\u0439, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0440\u0430\u0441\u043a\u0440\u0430\u0441\u0438\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438: &#8212;switches, @file, \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0432\u0440\u043e\u0434\u0435 %AhkDir%. \u041d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u043d\u0435\u0433\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0446\u0435\u043b\u044b\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f, \u0430 \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b.\u041a\u043b\u044e\u0447-\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u0412 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0432\u044b\u0448\u0435 \u043c\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u043b\u0438 \u043c\u0430\u0441\u0441\u0438\u0432 \u201c\u0441\u0438\u043c\u0432\u043e\u043b-\u0446\u0432\u0435\u0442\u201d, \u0433\u0434\u0435 \u043a\u043b\u044e\u0447 &#8212; \u044d\u0442\u043e \u0441\u0438\u043c\u0432\u043e\u043b, \u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 &#8212; \u044d\u0442\u043e \u0446\u0432\u0435\u0442\u043e\u0432\u043e\u0439 \u043a\u043e\u0434:msg.Color([   &#8216;&#187;&#8216;,  &#8216;cyan&#8217;,  &#8216;*&#8217;,  &#8216;green&#8217;])\u0422\u0430\u043a\u043e\u0439 \u043c\u0430\u0441\u0441\u0438\u0432 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u044b\u0432\u0430\u043b\u0441\u044f \u0432 chrColors:&#187; 96* 92\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043c\u044b \u043c\u043e\u0433\u043b\u0438 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c chrColors[&#8216;&#187;&#8216;] \u0438\u043b\u0438 chrColors[&#8216;*&#8217;], \u0433\u0434\u0435 \u043a\u0430\u0436\u0434\u044b\u0439 \u0441\u0438\u043c\u0432\u043e\u043b \u0441\u043b\u0443\u0436\u0438\u043b \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u043c \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 (\u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u044b\u043c \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435\u043c, \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f regex), \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u043c \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u043c (\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f match[1]) \u0438 \u043a\u043b\u044e\u0447\u043e\u043c \u0432 chrColors.\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u0445\u043e\u0434\u0438\u043c \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u201c\u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435-\u0446\u0432\u0435\u0442\u201d (\u0434\u043b\u044f \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0437\u0430\u0431\u0443\u0434\u0435\u043c \u043f\u0440\u043e \u0441\u0438\u043c\u0432\u043e\u043b\u044b):msg.Color([  &#8216;(@(file|list\\.ini))&#8217;,    &#8216;yellow&#8217;,   ; list  &#8216;(mainDir|AhkDir)(?=\\=)&#8217;, &#8216;purple&#8217;,   ; variables names  &#8216;(%[^%]+%)&#8217;,              &#8216;blue&#8217;,     ; variables values  &#8216;(\\-+[\\-\\w]+)(?=[ =])&#8217;,   &#8216;cyan&#8217;,     ; switches])\u041f\u0440\u0438 \u0442\u0430\u043a\u043e\u043c \u043f\u043e\u0434\u0445\u043e\u0434\u0435 \u043a\u0430\u0436\u0434\u043e\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u043e\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0441\u043b\u0443\u0436\u0438\u0442\u044c \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u043c \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u0438 \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u043c \u0442\u0435\u043a\u0441\u0442\u043e\u043c, \u0430 \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e &#8212; \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043a\u043b\u044e\u0447\u043e\u043c \u0432 chrColors.\u041a\u0430\u0436\u0434\u043e\u0435 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043c\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u043c \u0432 RegExMatch, \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0442\u0435\u043a\u0441\u0442. \u0421\u0430\u043c \u043f\u043e \u0441\u0435\u0431\u0435 \u043e\u043d \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0438\u0449\u0435\u0442, \u0430 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0432 \u043d\u0430\u0431\u043e\u0440 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439 \u0434\u043b\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430. \u0422\u043e \u0435\u0441\u0442\u044c \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u044b\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f &#8212; \u044d\u0442\u043e \u043d\u0435\u0447\u0442\u043e, \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0437\u0432\u0430\u0442\u044c \u043d\u0438\u0437\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u044b\u043c \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u043c\u044b\u043c \u044f\u0437\u044b\u043a\u043e\u043c, \u0433\u0434\u0435 \u043a\u0430\u0436\u0434\u044b\u0439 \u0441\u0438\u043c\u0432\u043e\u043b \u0432\u0440\u043e\u0434\u0435 \\w \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u0432 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u0443\u044e \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e.\u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0432\u0440\u043e\u0434\u0435 (%[^%]+%) \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u0432 \u043a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u0439\u0434\u0435\u043d \u0442\u0435\u043a\u0441\u0442 \u0432\u0440\u043e\u0434\u0435 %AhkDir%, %mainDir% \u0438 \u0442.\u0434. \u0422\u043e \u0435\u0441\u0442\u044c \u0432\u0445\u043e\u0434 ((%[^%]+%)) \u043d\u0435 \u0440\u0430\u0432\u0435\u043d \u0432\u044b\u0445\u043e\u0434\u0443 (%mainDir%) \u0438 \u043a\u0430\u043a \u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0435 &#8212; \u0442\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0441\u0430\u043c\u043e\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e\u043c \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043d\u0430\u043c \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u043b\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u043d\u0443\u0436\u043d\u044b\u0439 \u0446\u0432\u0435\u0442 \u043a \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u043e\u043c\u0443 \u0442\u0435\u043a\u0441\u0442\u0443. \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f, \u0441\u0430\u043c\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0441\u043b\u0443\u0436\u0438\u0442\u044c \u043a\u043b\u044e\u0447\u043e\u043c \u0432 chrColors \u0434\u043b\u044f \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u044f \u0446\u0432\u0435\u0442\u0430.Mark\u041a\u0430\u043a \u0432\u044b \u043c\u043e\u0433\u043b\u0438 \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c \u0440\u0430\u043d\u0435\u0435, \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f match \u0447\u0435\u043c-\u0442\u043e \u043f\u043e\u0445\u043e\u0436\u0430 \u043d\u0430 \u043c\u0430\u0441\u0441\u0438\u0432: match[0] \u0445\u0440\u0430\u043d\u0438\u0442 \u0432\u0441\u0435 \u0447\u0442\u043e \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043d\u0430\u0439\u0442\u0438, \u0430 match[1] \u0445\u0440\u0430\u043d\u0438\u0442 \u0442\u043e, \u0447\u0442\u043e \u043d\u0430\u0448\u043b\u0430 \u0437\u0430\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u044e\u0449\u0430\u044f \u0433\u0440\u0443\u043f\u043f\u0430 1. \u041e\u0434\u043d\u0430\u043a\u043e \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u044d\u0442\u043e match \u043e\u0431\u044a\u0435\u043a\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0445\u0440\u0430\u043d\u0438\u0442 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u044b, \u043d\u043e \u0438 \u043f\u043e\u043b\u044f: match.pos, match.len, match.count. \u0422\u0430\u043a\u0436\u0435 \u0443 \u043d\u0435\u0433\u043e \u0435\u0441\u0442\u044c \u043f\u043e\u043b\u0435 mark. \u041a\u043e\u0433\u0434\u0430 RegExMatch() \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u0442 \u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u0435 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e (*MARK:..), \u043f\u043e\u043b\u0435 mark \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e\u0441\u043b\u0435 \u0434\u0432\u043e\u0435\u0442\u043e\u0447\u0438\u044f : \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u043e\u0441\u043b\u0435 (*MARK:chr) \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 match.mark \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0432\u043d\u043e &#171;chr&#187;.\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0434\u0440\u0443\u0433\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440:(%[^%]+%)(*MARK:1)|(~[^~]+~)(*MARK:2)\u0415\u0441\u043b\u0438 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0445\u0432\u0430\u0447\u0435\u043d\u0430 \u0433\u0440\u0443\u043f\u043f\u0430 1, match.mark \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0432\u0435\u043d \u201c1\u201d. \u0415\u0441\u043b\u0438 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0445\u0432\u0430\u0447\u0435\u043d\u0430 \u0433\u0440\u0443\u043f\u043f\u0430 2, match.mark \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0432\u0435\u043d \u201c2\u201d.\u041c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u0443 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0434\u043b\u044f \u043c\u0430\u0440\u043a\u0438\u0440\u043e\u0432\u043a\u0438 (\u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0446\u0438\u0438) \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432: 1, 2, 3, \u2026 \u041a\u0430\u0436\u0434\u044b\u0439 \u0448\u0430\u0431\u043b\u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 mark, \u0442\u043e \u0435\u0441\u0442\u044c \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043b\u044e\u0447 \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0442\u044c \u0446\u0432\u0435\u0442 \u0438\u0437 chrColors:begin  := esc &#8216;[0;&#8217; chrColors[match.mark] &#8216;m&#8217;clrMsg .= begin . match[1]\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u043a\u043e\u043d\u0435\u0446 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u0438\u0437 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 aRegexColor mark \u0441 \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u043c, \u0430 \u0437\u0430\u0442\u0435\u043c \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u0432\u0441\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u044b \u0432 \u0435\u0434\u0438\u043d\u043e\u0435 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 OR |regex     := &#187; ; \u0438\u0442\u043e\u0433\u043e\u0432\u043e\u0435 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435    chars     := &#187;    ; \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0438\u0442\u043e\u0433\u043e\u0432\u043e\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0441 \u0441\u0438\u043c\u0432\u043e\u043b\u0430\u043c\u0438    chrColors := Map()        index     := 1; \u0438\u043d\u0434\u0435\u043a\u0441 \u043c\u0430\u0441\u0441\u0438\u0432\u0430    idxColor  := 1  ; \u0438\u043d\u0434\u0435\u043a\u0441 \u0434\u043b\u044f mark        loop (aRegexColor.length \/ 2) {        str   := aRegexColor[index++]        color := aRegexColor[index++]        if (str.length = 1) {            ; \u0421\u0438\u043c\u0432\u043e\u043b\u044b \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u044e\u0442\u0441\u044f \u0432 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0432\u0438\u0434\u0430 [..]            chars .= str            chrColors[str] := colors[color]; \u0441\u0438\u043c\u0432\u043e\u043b-\u043a\u043e\u0434        } else {            ; \u0428\u0430\u0431\u043b\u043e\u043d\u044b \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u044e\u0442\u0441\u044f \u0432 \u043e\u0434\u0438\u043d \u0431\u043e\u043b\u044c\u0448\u043e\u0439            regex .= str &#8216;(*MARK:&#8217; idxColor &#8216;)|&#8217;             chrColors[String(idxColor++)] := colors[color]; \u0438\u043d\u0434\u0435\u043a\u0441-\u043a\u043e\u0434        }    }        if chars        regex .= &#8216;([&#8216; chars &#8216;])(*MARK:chr)&#8217; ; \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u0438\u043c\u0432\u043e\u043b\u044b \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0432 \u043a\u043e\u043d\u0435\u0446    else        regex := regex.RTrim(&#8216;|&#8217;); \u0443\u0434\u0430\u043b\u044f\u0435\u043c \u043b\u0438\u0448\u043d\u0438\u0439 OR |\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u043e\u0434\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0432\u0440\u043e\u0434\u0435 (..)(*MARK:1)|(..)(*MARK:2)|&#8230;|([..])(*MARK:chr). \u0414\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0432\u0441\u044e \u0442\u0443 \u0436\u0435 HashMap, \u0412 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0435\u0441\u0442\u044c \u043f\u0430\u0440\u044b \u201c\u0438\u043d\u0434\u0435\u043a\u0441-\u043a\u043e\u0434\u201d \u0438 \u0443\u0436\u0435 \u0437\u043d\u0430\u043a\u043e\u043c\u044b\u0435 \u043d\u0430\u043c \u043f\u0430\u0440\u044b \u201c\u0441\u0438\u043c\u0432\u043e\u043b-\u043a\u043e\u0434\u201d:\u0412\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f: \u043a\u043b\u044e\u0447 match.mark (\u0438\u043d\u0434\u0435\u043a\u0441).\u0421\u0438\u043c\u0432\u043e\u043b\u044b: \u043a\u043b\u044e\u0447 \u0441\u0430\u043c \u0441\u0438\u043c\u0432\u043e\u043b match[1].\u0422\u0430\u043a \u043a\u0430\u043a \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f (\u0441\u0438\u043c\u0432\u043e\u043b \u0438\u043b\u0438 \u0438\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439) \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0440\u0430\u0437\u043d\u044b\u0439 \u043a\u043b\u044e\u0447, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0441 \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u043c \u043e\u0442 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0441 \u0441\u0438\u043c\u0432\u043e\u043b\u0430\u043c\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e (*MARK:chr):        if (match.mark != &#8216;chr&#8217;) {            ; \u0418\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0448\u0430\u0431\u043b\u043e\u043d: \u043e\u0431\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u0432 \u0446\u0432\u0435\u0442            begin  := esc &#8216;[0;&#8217; chrColors[match.mark] &#8216;m&#8217;            clrMsg .= begin . match[1] . end            continue        }        ; \u041f\u0430\u0440\u043d\u044b\u0439 \u0441\u0438\u043c\u0432\u043e\u043b        if (stack.Has(-1) &amp;&amp; stack[-1] = match[1]) {            clrMsg .= end            stack.Pop()        } else {            begin  := esc &#8216;[0;&#8217; chrColors[match[1]] &#8216;m&#8217;            clrMsg .= begin            stack.Push(match[1])        }Branch Reset\u0423 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0433\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0435\u0441\u0442\u044c \u043a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u043a: \u043e\u043d\u043e \u0438\u043c\u0435\u0435\u0442 \u043c\u043d\u043e\u0433\u043e \u0437\u0430\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u044e\u0449\u0438\u0445 \u0433\u0440\u0443\u043f\u043f. \u041a\u0430\u043a \u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0435, \u043a\u0430\u0436\u0434\u044b\u0439 \u0437\u0430\u0445\u0432\u0430\u0447\u0435\u043d\u043d\u044b\u0439 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u0442\u0435\u043a\u0441\u0442\u0430 \u0431\u0443\u0434\u0435\u0442 \u0441\u0432\u044f\u0437\u0430\u043d \u0441\u043e \u0441\u0432\u043e\u0435\u0439 \u0437\u0430\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u044e\u0449\u0435\u0439 \u0433\u0440\u0443\u043f\u043f\u043e\u0439: 1, 2, \u2026\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u043a\u043e\u0434\u0430:&#187;%variable% is ~gray~&#187;.Color([    &#8216;(%[^%]+%)&#8217;, &#8216;blue&#8217;,     &#8216;(~[^~]+~)&#8217;, &#8216;gray&#8217;])Color \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435:(%[^%]+%)(*MARK:1)|(~[^~]+~)(*MARK:2)\u0412 \u043d\u0435\u043c 2 \u0437\u0430\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u044e\u0449\u0438\u0435 \u0433\u0440\u0443\u043f\u043f\u044b:\u0418\u043d\u0434\u0435\u043a\u0441\u0413\u0440\u0443\u043f\u043f\u0430\u0422\u0435\u043a\u0441\u04421(%[^%]+%)%variable%2(~[^~]+~)~gray~\u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0434\u043b\u044f \u0442\u0435\u043a\u0441\u0442\u0430 ~gray~ \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043b\u0435\u0436\u0438\u0442 \u0432 match[2], \u0430 match[1] (\u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0432 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0435) \u043f\u0443\u0441\u0442. \u0422\u043e \u0435\u0441\u0442\u044c \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0437\u043d\u0430\u0442\u044c \u0438\u043d\u0434\u0435\u043a\u0441 \u0433\u0440\u0443\u043f\u043f\u044b \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0442\u0435\u043a\u0441\u0442. \u0410 \u0435\u0441\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043f\u0435\u0440\u0435\u0434\u0430\u043b \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u0448\u0430\u0431\u043b\u043e\u043d\u0435 \u0435\u0449\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0433\u0440\u0443\u043f\u043f, \u0432\u0440\u043e\u0434\u0435 =(%([^@](\\w+))%) \u0442\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0438\u043d\u0434\u0435\u043a\u0441 \u0431\u0443\u0434\u0435\u0442 \u0441\u043b\u043e\u0436\u043d\u043e. \u0410 \u043c\u044b \u0445\u043e\u0442\u0438\u043c, \u0447\u0442\u043e\u0431\u044b \u0442\u0435\u043a\u0441\u0442 \u0438\u043b\u0438 \u0441\u0438\u043c\u0432\u043e\u043b \u0432\u0441\u0435\u0433\u0434\u0430 \u043b\u0435\u0436\u0430\u043b \u0432 match[1].\u0414\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 Branch Reset. Branch Reset \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e \u0432\u0438\u0434\u0430 (?|..), \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0434\u0435\u043b\u0430\u0435\u0442 \u0438\u043d\u0434\u0435\u043a\u0441 \u043a\u0430\u0436\u0434\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u044b \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c. \u0415\u0441\u043b\u0438 \u043c\u044b \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043c \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 ()|()|&#8230; \u043a\u0430\u043a \u0441\u043f\u0438\u0441\u043e\u043a \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432, \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0445 |, \u0442\u043e \u0438\u043d\u0434\u0435\u043a\u0441 \u043a\u0430\u0436\u0434\u043e\u0439 \u0437\u0430\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u044e\u0449\u0435\u0439 \u0433\u0440\u0443\u043f\u043f\u044b \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430:( () )|( () () )1  2   1  2  3 \u0422\u043e \u0435\u0441\u0442\u044c \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c \u043d\u0435 \u0432\u0441\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0446\u0435\u043b\u0438\u043a\u043e\u043c, \u0430 \u0435\u0433\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b, \u0430 \u0437\u0430 \u0442\u0435\u043c \u0433\u0440\u0443\u043f\u043f\u044b \u0432\u043d\u0443\u0442\u0440\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432. \u0411\u0435\u0437 Branch Reset \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0446\u0438\u044f \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u0430\u044f:( () )|( () () )1  2   3  4  5 \u041e\u0431\u0435\u0440\u043d\u0435\u043c \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0432 (?|..):(?|(%[^%]+%)(*MARK:1)|(~[^~]+~)(*MARK:2))\u0412\u0430\u0436\u043d\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c, \u0447\u0442\u043e (?|..) &#8212; \u043d\u0435 \u0437\u0430\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u044e\u0449\u0430\u044f \u0433\u0440\u0443\u043f\u043f\u0430, \u0430 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u201cBranch Reset\u201d. \u0418 (*MARK:..) &#8212; \u201c\u0433\u043b\u0430\u0433\u043e\u043b\u201d (verb). \u0421\u043a\u043e\u0431\u043a\u0438 \u043b\u0438\u0448\u044c \u0447\u0430\u0441\u0442\u044c \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u0430.\u0412 \u0438\u0442\u043e\u0433\u0435 \u0443 \u043d\u0430\u0441 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0446\u0438\u044f:\u0418\u043d\u0434\u0435\u043a\u0441Mark\u0413\u0440\u0443\u043f\u043f\u0430\u0422\u0435\u043a\u0441\u044211(%[^%]+%)%variable%12(~[^~]+~)~gray~\u0412 match[1] \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u043b\u0435\u0436\u0430\u0442\u044c \u0437\u0430\u0445\u0432\u0430\u0447\u0435\u043d\u043d\u044b\u0439 \u0442\u0435\u043a\u0441\u0442 \u0438\u0437 1-\u0439, 2-\u0439 \u0438\u043b\u0438 3-\u0439 \u0433\u0440\u0443\u043f\u043f\u044b. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c match.mark \u0431\u0443\u0434\u0435\u0442 \u043f\u043e-\u043f\u0440\u0435\u0436\u043d\u0435\u043c\u0443 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441:    if chars        regex .= &#8216;([&#8216; chars &#8216;])(*MARK:chr)&#8217;    else        regex := regex.RTrim(&#8216;|&#8217;)    regex := &#8216;(?|&#8217; regex &#8216;)&#8217;\u041f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0446\u0432\u0435\u0442\u043e\u0432\u0412 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0430\u0448 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u0431\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u0442 \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0439 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u0442\u0435\u043a\u0441\u0442\u0430 \u0432 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u0438 \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u0446\u0432\u0435\u0442:&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-486807","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/486807","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=486807"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/486807\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=486807"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=486807"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=486807"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}