{"id":350521,"date":"2023-07-19T21:00:49","date_gmt":"2023-07-19T21:00:49","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=350521"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=350521","title":{"rendered":"<span>Regex engine internals as a library. Part 2<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<h2>\u0421\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435<\/h2>\n<ul>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/articles\/748362\/#brief_history\" rel=\"noopener noreferrer nofollow\">\u041a\u0440\u0430\u0442\u043a\u0438\u0439 \u044d\u043a\u0441\u043a\u0443\u0440\u0441<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/articles\/748362\/#problems\" rel=\"noopener noreferrer nofollow\">\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u044b<\/a> <\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/articles\/748362\/#composition\" rel=\"noopener noreferrer nofollow\">\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430: \u0441\u043b\u043e\u0436\u043d\u0430\u044f \u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u044f<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/articles\/748362\/#testing\" rel=\"noopener noreferrer nofollow\">\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430: \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/articles\/748362\/#niche_apis\" rel=\"noopener noreferrer nofollow\">\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430: \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u043d\u0438\u0448\u0435\u0432\u044b\u0435 API<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/articles\/748362\/#compiled_dfas\" rel=\"noopener noreferrer nofollow\">\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430: \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0414\u041a\u0410<\/a><\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/articles\/749124\/#regex_cli\" rel=\"noopener noreferrer nofollow\">\u0421\u043b\u0435\u0434\u0443\u0439 \u0441 regex-cli<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/articles\/749124\/#data_flow\" rel=\"noopener noreferrer nofollow\">\u041f\u043e\u0442\u043e\u043a \u0434\u0430\u043d\u043d\u044b\u0445<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/articles\/749124\/#lit_optimize\" rel=\"noopener noreferrer nofollow\">\u041b\u0438\u0442\u0435\u0440\u0430\u043b\u044c\u043d\u044b\u0435 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438<\/a> <\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/articles\/749124\/#lit_motivation\" rel=\"noopener noreferrer nofollow\">\u041c\u043e\u0442\u0438\u0432\u0430\u0446\u0438\u044f \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u044c\u043d\u044b\u0445 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0439<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/articles\/749124\/#lit_extraction\" rel=\"noopener noreferrer nofollow\">\u0418\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u0435 \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u043e\u0432<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/articles\/749124\/#lit_search\" rel=\"noopener noreferrer nofollow\">\u041f\u043e\u0438\u0441\u043a \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u043e\u0432<\/a><\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<hr\/>\n<h3>\u041f\u043e \u043f\u0443\u0442\u0438 \u0441 regex-cli<\/h3>\n<p><code>regex-cli<\/code> &#8212; \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u043e\u043f\u0440\u043e\u0432\u043e\u0436\u0434\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u0447\u0430\u0441\u0442\u044c \u043a\u0440\u0435\u0439\u0442\u0430 <code>regex<\/code>, \u0438 \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a\u043e \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0443 API \u043a\u0440\u0435\u0439\u0442\u043e\u0432 <code>regex-syntax<\/code>, <code>regex-automata<\/code> \u0438 <code>regex<\/code>. \u0422\u0430\u043a \u0436\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u0443\u0442\u0438\u043b\u0438\u0442\u044b, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0414\u041a\u0410 \u0432 \u0444\u0430\u0439\u043b \u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f Rust-\u043a\u043e\u0434\u0430 \u0434\u043b\u044f \u0438\u0445 \u0447\u0442\u0435\u043d\u0438\u044f.<\/p>\n<p>\u042f \u0431\u0443\u0434\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <code>regex-cli<\/code> \u043d\u0430 \u043f\u0440\u043e\u0442\u044f\u0436\u0435\u043d\u0438\u0438 \u0432\u0441\u0435\u0433\u043e \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u0441\u0442\u0430, \u0442\u0430\u043a \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c, \u043c\u043e\u0436\u0435\u0442\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u044d\u0442\u0443 \u0442\u0443\u043b\u0437\u0443 \u043f\u0440\u044f\u043c\u043e \u0438\u0437 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f \u043a\u0440\u0435\u0439\u0442\u0430 <code>regex<\/code>:<\/p>\n<pre><code>$ cargo install regex-cli <\/code><\/pre>\n<p>\u0412\u043e\u0442 \u043f\u0430\u0440\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442, \u043a\u0430\u043a \u0432\u043b\u0438\u044f\u0435\u0442 \u042e\u043d\u0438\u043a\u043e\u0434 \u043d\u0430 \u0440.\u0432. <code>.<\/code>. \u0421\u043d\u0430\u0447\u0430\u043b\u0430, \u0432\u0435\u0440\u0441\u0438\u044f, \u0433\u0434\u0435 \u0432\u043a\u043b\u044e\u0447\u0435\u043d \u042e\u043d\u0438\u043a\u043e\u0434:<\/p>\n<pre><code>$ regex-cli debug thompson '.' --no-table  thompson::NFA( >000000: binary-union(2, 1)  000001: \\x00-\\xFF => 0 ^000002: capture(pid=0, group=0, slot=0) => 10  000003: \\x80-\\xBF => 11  000004: \\xA0-\\xBF => 3  000005: \\x80-\\xBF => 3  000006: \\x80-\\x9F => 3  000007: \\x90-\\xBF => 5  000008: \\x80-\\xBF => 5  000009: \\x80-\\x8F => 5  000010: sparse(\\x00-\\t => 11, \\x0B-\\x7F => 11, \\xC2-\\xDF => 3, \\xE0 => 4, \\xE1-\\xEC => 5, \\xED => 6, \\xEE-\\xEF => 5, \\xF0 => 7, \\xF1-\\xF3 => 8, \\xF4 => 9)  000011: capture(pid=0, group=0, slot=1) => 12  000012: MATCH(0)  transition equivalence classes: ByteClasses(0 => [\\x00-\\t], 1 => [\\n], 2 => [\\x0B-\\x7F], 3 => [\\x80-\\x8F], 4 => [\\x90-\\x9F], 5 => [\\xA0-\\xBF], 6 => [\\xC0-\\xC1], 7 => [\\xC2-\\xDF], 8 => [\\xE0], 9 => [\\xE1-\\xEC], 10 => [\\xED], 11 => [\\xEE-\\xEF], 12 => [\\xF0], 13 => [\\xF1-\\xF3], 14 => [\\xF4], 15 => [\\xF5-\\xFF], 16 => [EOI]) ) <\/code><\/pre>\n<p>\u0410 \u0432\u043e\u0442 \u0432\u0435\u0440\u0441\u0438\u044f \u0441 \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u043c \u042e\u043d\u0438\u043a\u043e\u0434\u043e\u043c:<\/p>\n<pre><code>$ regex-cli debug thompson '(?-u:.)' --no-table --no-utf8-syntax  thompson::NFA( >000000: binary-union(2, 1)  000001: \\x00-\\xFF => 0 ^000002: capture(pid=0, group=0, slot=0) => 3  000003: sparse(\\x00-\\t => 4, \\x0B-\\xFF => 4)  000004: capture(pid=0, group=0, slot=1) => 5  000005: MATCH(0)  transition equivalence classes: ByteClasses(0 => [\\x00-\\t], 1 => [\\n], 2 => [\\x0B-\\xFF], 3 => [EOI]) ) <\/code><\/pre>\n<p>\u041d\u0430 \u0432\u044b\u0432\u043e\u0434\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043d \u041d\u041a\u0410 \u0422\u043e\u043c\u043f\u0441\u043e\u043d\u0430, \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043a\u0440\u0435\u0439\u0442\u043e\u043c <code>regex-automata<\/code> \u0434\u043b\u044f \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0440.\u0432. \u041a\u043e\u043c\u0430\u043d\u0434\u0430 <code>regex-cli debug<\/code> \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u044c \u043c\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u044d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043a\u0440\u0435\u0439\u0442\u0430 <code>regex<\/code>.<\/p>\n<pre><code> $ regex-cli debug Prints the debug representation of various things from regex-automata and regex-syntax.  This is useful for ad hoc interactions with objects on the command line. In general, most objects support the full suite of configuration available in code via the crate.  USAGE:     regex-cli debug &lt;command> ...  COMMANDS:     ast        Print the debug representation of an AST.     dense      Print the debug representation of a dense DFA.     hir        Print the debug representation of an HIR.     literal    Print the debug representation of extracted literals.     onepass    Print the debug representation of a one-pass DFA.     sparse     Print the debug representation of a sparse DFA.     thompson   Print the debug representation of a Thompson NFA. <\/code><\/pre>\n<p>\u0422\u0430\u043a \u0436\u0435 \u0435\u0441\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0430 <code>regex-cli find<\/code>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c ad hoc \u043f\u043e\u0438\u0441\u043a. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u043e\u0442 \u043a\u0430\u043a \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043c\u0443\u043b\u044c\u0442\u0438-\u0448\u0430\u0431\u043b\u043e\u043d\u043d\u044b\u0439 \u043f\u043e\u0438\u0441\u043a \u0441 \u0433\u0440\u0443\u043f\u043f\u0430\u043c\u0438 \u0437\u0430\u0445\u0432\u0430\u0442\u0430, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0434\u0432\u0438\u0436\u043e\u043a \u0440.\u0432. meta:<\/p>\n<pre><code>$ regex-cli find capture meta \\    -p '(?&lt;email>[.\\w]+@(?&lt;domain>[.\\w]+))' \\    -p '(?&lt;phone>(?&lt;areacode>[0-9]{3})-[0-9]{3}-[0-9]{4})' \\    -y 'foo@example.com, 111-867-5309'      parse time:  20.713\u00b5s  translate time:  22.116\u00b5s build meta time:  834.731\u00b5s     search time:  142.537\u00b5s   total matches:  2 0:{ 0: 0..15\/foo@example.com, 1\/email: 0..15\/foo@example.com, 2\/domain: 4..15\/example.com } 1:{ 0: 17..29\/111-867-5309, 1\/phone: 17..29\/111-867-5309, 2\/areacode: 17..20\/111 } <\/code><\/pre>\n<p>\u0417\u0430\u0433\u043b\u044f\u043d\u0438\u0442\u0435 \u0432 <a href=\"https:\/\/github.com\/rust-lang\/regex\/blob\/4f47b14d60e82e85a880513833362d5fb485ffa8\/regex-cli\/README.md\" rel=\"noopener noreferrer nofollow\"><code>regex-cli README<\/code><\/a> \u0437\u0430 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438.<\/p>\n<h3>\u041f\u043e\u0442\u043e\u043a \u0434\u0430\u043d\u043d\u044b\u0445<\/h3>\n<p>\u041f\u0435\u0440\u0435\u0434 \u0442\u0435\u043c, \u043a\u0430\u043a \u043f\u043e\u0433\u0440\u0443\u0437\u0438\u0442\u044c\u0441\u044f \u0432 \u0434\u0435\u0442\u0430\u043b\u0438, \u0441\u0442\u043e\u0438\u0442 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0430\u0443\u0437\u0443 \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0441 \u0442\u0435\u0440\u043c\u0438\u043d\u043e\u043b\u043e\u0433\u0438\u0435\u0439 \u0438 \u043a\u0440\u0430\u0442\u043a\u043e \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u043f\u043e\u0442\u043e\u043a \u0434\u0430\u043d\u043d\u044b\u0445, \u043f\u0440\u043e\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u0447\u0435\u0440\u0435\u0437 \u0434\u0432\u0438\u0436\u043e\u043a \u0440.\u0432. \u0422.\u0435., \u043a\u043e\u0433\u0434\u0430 \u0432\u044b \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0435 <code>Regex::new<\/code> \u0441 \u043a\u0430\u043a\u0438\u043c-\u0442\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u043c, \u043c\u044b \u043e\u0442\u0441\u043b\u0435\u0434\u0438\u043c \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f, \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u044f\u0449\u0438\u0435 \u0441 \u044d\u0442\u0438\u043c \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u044e\u0442 \u0435\u0433\u043e \u0432 \u043d\u0435\u0447\u0442\u043e, \u0447\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043a\u0430\u0442\u044c \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u044f.<\/p>\n<ul>\n<li>\n<p>\u041f\u0435\u0440\u0432\u044b\u043c \u0434\u0435\u043b\u043e\u043c \u0441\u0442\u0440\u043e\u043a\u0430 \u0441 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u043c \u043f\u0430\u0440\u0441\u0438\u0442\u0441\u044f \u0432 <a href=\"https:\/\/docs.rs\/regex-syntax\/0.7.*\/regex_syntax\/ast\/enum.Ast.html\" rel=\"noopener noreferrer nofollow\"><code>Ast<\/code> (Abstract Syntax Tree)<\/a>. <code>Ast<\/code> &#8212; \u044d\u0442\u043e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u0430.<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u0442\u0435\u043c <code>Ast<\/code> \u0442\u0440\u0430\u043d\u0441\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0432 <a href=\"https:\/\/docs.rs\/regex-syntax\/0.7.*\/regex_syntax\/hir\/struct.Hir.html\" rel=\"noopener noreferrer nofollow\"><code>Hir<\/code> (High-Level Intermediate Representation)<\/a> <code>Hir<\/code> &#8212; \u044d\u0442\u043e \u0434\u0440\u0443\u0433\u043e\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u0430, \u043d\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0435\u0435 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u043c\u0435\u043d\u044c\u0448\u0435 \u0434\u0435\u0442\u0430\u043b\u0435\u0439, \u0447\u0435\u043c <code>Ast<\/code>. \u0412\u0435\u0449\u0438, \u0432\u0440\u043e\u0434\u0435 Unicode case folding \u0438\u043b\u0438 Unicode character class reference \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u044e\u0442\u0441\u044f \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0442\u0440\u0430\u043d\u0441\u043b\u044f\u0446\u0438\u0438.<\/p>\n<\/li>\n<li>\n<p>\u0421\u043b\u0435\u0434\u043e\u043c <code>Hir<\/code> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0434\u0432\u0443\u0445 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439. \u041f\u0435\u0440\u0432\u0430\u044f &#8212; \u044d\u0442\u043e <a href=\"https:\/\/docs.rs\/regex-syntax\/0.7.2\/regex_syntax\/hir\/literal\/struct.Seq.html\" rel=\"noopener noreferrer nofollow\">\u043b\u0438\u0442\u0435\u0440\u0430\u043b\u044c\u043d\u0430\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c (literal sequence)<\/a>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u043e\u0432, \u0438\u0437\u0432\u043b\u0435\u0447\u0451\u043d\u043d\u043e\u0439 \u0438\u0437 \u0448\u0430\u0431\u043b\u043e\u043d\u0430, \u0438 \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u043e\u0438\u0441\u043a\u0430 \u043f\u043e \u0440.\u0432. \u0432 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445. \u041f\u0440\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438, \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u044c\u043d\u0430\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f <a href=\"https:\/\/docs.rs\/regex-automata\/0.3.*\/regex_automata\/util\/prefilter\/struct.Prefilter.html\" rel=\"noopener noreferrer nofollow\">\u043f\u0440\u0435\u0444\u0438\u043b\u044c\u0442\u0440\u0430 (Prefilter)<\/a>. \u0412\u0442\u043e\u0440\u0430\u044f \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044c &#8212; \u044d\u0442\u043e <a href=\"https:\/\/docs.rs\/regex-automata\/0.3.*\/regex_automata\/nfa\/thompson\/struct.NFA.html\" rel=\"noopener noreferrer nofollow\">\u041d\u041a\u0410<\/a><\/p>\n<\/li>\n<li>\n<p>\u0412 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u041d\u041a\u0410 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0434\u0432\u0438\u0436\u043a\u043e\u0432 \u0440.\u0432.:<\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/docs.rs\/regex-automata\/0.3.*\/regex_automata\/nfa\/thompson\/pikevm\/struct.PikeVM.html\" rel=\"noopener noreferrer nofollow\"><code>PikeVM<\/code><\/a> \u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441\u043e \u0432\u0441\u0435\u043c\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u043c\u0438 \u0440.\u0432., \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u043e\u043c. \u0422\u0430\u043a \u0436\u0435 <code>PikeVM<\/code> \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u043e\u0431\u0449\u0430\u0442\u044c \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0441\u043e\u0432\u043f\u0430\u0432\u0448\u0438\u0445 \u0433\u0440\u0443\u043f\u043f \u0437\u0430\u0445\u0432\u0430\u0442\u0430.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/docs.rs\/regex-automata\/0.3.*\/regex_automata\/nfa\/thompson\/backtrack\/struct.BoundedBacktracker.html\" rel=\"noopener noreferrer nofollow\"><code>BoundedBacktracker<\/code><\/a> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0442\u0435\u0445\u043d\u0438\u043a\u0443 \u043e\u0442\u043a\u0430\u0442\u0430, \u043d\u043e \u044f\u0432\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u0435\u0442 \u0441\u0435\u0431\u044f, \u0447\u0442\u043e\u0431\u044b \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u043f\u043e\u0432\u0442\u043e\u0440\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0445\u043e\u0434\u043e\u0432. \u041a\u0430\u043a \u0438 <code>PikeVM<\/code>, \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u043e\u0431\u0449\u0430\u0442\u044c \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u0433\u0440\u0443\u043f\u043f \u0437\u0430\u0445\u0432\u0430\u0442\u0430.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/docs.rs\/regex-automata\/0.3.*\/regex_automata\/dfa\/onepass\/struct.DFA.html\" rel=\"noopener noreferrer nofollow\">\u041e\u0434\u043d\u043e\u043f\u0440\u043e\u0445\u043e\u0434\u043d\u044b\u0439 \u0414\u041a\u0410 (one-pass DFA)<\/a> \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043e\u0447\u0435\u043d\u044c \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u043e\u0435 \u043f\u043e\u0434\u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0440.\u0432., \u043d\u043e \u043c\u043e\u0436\u0435\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u0433\u0440\u0443\u043f\u043f \u0437\u0430\u0445\u0432\u0430\u0442\u0430 \u043e\u0447\u0435\u043d\u044c \u0431\u044b\u0441\u0442\u0440\u043e.<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 <code>[\u043f\u043b\u043e\u0442\u043d\u044b\u0439 \u0414\u041a\u0410 (dense DFA)<\/code>](<a href=\"https:\/\/docs.rs\/regex-automata\/0.3.*\/regex_automata\/dfa\/dense\/struct.DFA.html\" rel=\"noopener noreferrer nofollow\">https:\/\/docs.rs\/regex-automata\/0.3.*\/regex_automata\/dfa\/dense\/struct.DFA.html<\/a>). \u041c\u043e\u0436\u0435\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u0447\u0430\u043b\u043e \u0438 \u043a\u043e\u043d\u0435\u0446 (\u043a\u043e\u0433\u0434\u0430 \u0441\u043a\u043e\u043c\u0431\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u043d \u0441\u043e \u0432\u0442\u043e\u0440\u044b\u043c \u0440\u0430\u0437\u0432\u0451\u0440\u043d\u0443\u0442\u044b\u043c \u0437\u0430\u0434\u043e\u043c \u043d\u0430\u043f\u0435\u0440\u0451\u0434 \u0414\u041a\u0410) \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u044f, \u043d\u043e \u0447\u0440\u0435\u0437\u0432\u044b\u0447\u0430\u0439\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u044b\u0439. \u0413\u043b\u0430\u0432\u043d\u044b\u0439 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u043a &#8212; \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0432 \u0445\u0443\u0434\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0438\u043c\u0435\u0435\u0442 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c <code>O(2^m)<\/code> \u043f\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0438 \u043f\u0430\u043c\u044f\u0442\u0438.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/docs.rs\/regex-automata\/0.3.*\/regex_automata\/hybrid\/dfa\/struct.DFA.html\" rel=\"noopener noreferrer nofollow\">\u041b\u0435\u043d\u0438\u0432\u044b\u0439 \u0414\u041a\u0410 (Lazy DFA)<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u0438\u0440\u0443\u0435\u0442 \u0441\u0435\u0431\u044f \u0438\u0437 <code>\u041d\u041a\u0410<\/code> \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u043f\u043e\u0438\u0441\u043a\u0430. \u0412 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u043e\u043d \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u0435\u0435 <code>PikeVM<\/code>, \u043d\u043e \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u043e\u043d \u0442\u0430\u043a\u043e\u0439 \u0436\u0435 \u0431\u044b\u0441\u0442\u0440\u044b\u0439, \u043a\u0430\u043a <code>\u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0414\u041a\u0410<\/code>, \u043d\u043e \u043a \u0442\u043e\u043c\u0443 \u0436\u0435 \u0431\u0435\u0437 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438 <code>O(2^m)<\/code> \u043f\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438\/\u043f\u0430\u043c\u044f\u0442\u0438 \u043f\u0440\u0438 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438.<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u0412\u0441\u0435 \u0438\u0437 \u0432\u044b\u0448\u0435\u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0445 \u0434\u0432\u0438\u0436\u043a\u043e\u0432 \u0440.\u0432., \u0432\u043a\u043b\u044e\u0447\u0430\u044f <code>Prefilter<\/code>, \u0435\u0441\u043b\u0438 \u043e\u043d \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u0438\u0440\u0443\u0435\u0442\u0441\u044f, \u043c\u043e\u0433\u0443\u0442 \u043a\u043e\u043c\u0431\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u043e\u0434\u0438\u043d\u043e\u0447\u043d\u044b\u0439 <a href=\"https:\/\/docs.rs\/regex-automata\/0.3.*\/regex_automata\/meta\/struct.Regex.html\" rel=\"noopener noreferrer nofollow\"><code>\u043c\u0435\u0442\u0430 \u0434\u0432\u0438\u0436\u043e\u043a \u0440.\u0432.<\/code><\/a>.<\/p>\n<\/li>\n<li>\n<p>\u041a\u0440\u0435\u0439\u0442 <code>regex<\/code> \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0430\u043c \u043f\u043e \u0441\u0435\u0431\u0435 \u043b\u0438\u0448\u044c \u0442\u043e\u043d\u043a\u043e\u0439 \u043e\u0431\u0451\u0440\u0442\u043a\u043e\u0439 \u043d\u0430\u0434 \u043c\u0435\u0442\u0430 \u0434\u0432\u0438\u0436\u043a\u043e\u043c \u0440.\u0432. \u0438\u0437 \u043a\u0440\u0435\u0439\u0442\u0430 <code>regex-automata<\/code>.<\/p>\n<\/li>\n<\/ul>\n<p>\u041c\u044b \u043e\u0431\u0441\u0443\u0434\u0438\u043c \u043a\u0430\u0436\u0434\u0443\u044e \u0438\u0437 \u044d\u0442\u0438\u0445 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439 \u0431\u043e\u043b\u0435\u0435 \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u043e \u043d\u0430 \u043f\u0440\u043e\u0442\u044f\u0436\u0435\u043d\u0438\u0438 \u043f\u043e\u0441\u0442\u0430, \u043d\u043e \u0442\u0440\u0443\u0434\u043d\u043e \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u043e\u0442\u0441\u044b\u043b\u043e\u043a \u043a \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0438\u0437 \u043d\u0438\u0445 \u043d\u0430 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0445 \u044d\u0442\u0430\u043f\u0430\u0445 \u043e\u0431\u044a\u044f\u0441\u043d\u0435\u043d\u0438\u044f, \u0434\u043e \u043f\u043e\u043b\u043d\u043e\u0433\u043e \u0438\u0445 \u0440\u0430\u0441\u043a\u0440\u044b\u0442\u0438\u044f. \u0414\u0430\u043d\u043d\u0430\u044f \u0433\u043b\u0430\u0432\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0434\u0430\u0451\u0442 \u0441\u0430\u043c\u044b\u0439 \u043e\u0431\u0449\u0438\u0439 \u0447\u0435\u0440\u0442\u0451\u0436 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u043e\u0441\u0442\u0435\u0439 \u043a\u0440\u0435\u0439\u0442\u0430 <code>regex<\/code>, \u0438 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0430 \u0437\u0434\u0435\u0441\u044c \u0434\u043b\u044f \u0432\u0432\u0435\u0434\u0435\u043d\u0438\u044f.<\/p>\n<h3>\u041b\u0438\u0442\u0435\u0440\u0430\u043b\u044c\u043d\u044b\u0435 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438<\/h3>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0433\u043b\u0430\u0432\u0435 \u043c\u044b \u043d\u0430\u0447\u043d\u0451\u043c \u043d\u0430\u0448\u0435 \u043f\u0443\u0442\u0435\u0448\u0435\u0441\u0442\u0432\u0438\u0435 \u0432\u043e \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u043a\u0440\u0435\u0439\u0442\u0430 <code>regex<\/code> \u0438 \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043e \u043a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u0430\u0436\u043d\u043e\u0439 \u0442\u0435\u0445\u043d\u0438\u043a\u0435 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0442\u0430\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f: \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u0435 \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u043e\u0432 \u0438\u0437 \u0440.\u0432. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0440.\u0432. <code>(foo|bar|quux)(\\s+\\w+)<\/code> \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u044b\u0439 \u044f\u0437\u044b\u043a, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0432\u0441\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u044f\u0437\u044b\u043a\u0430 \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0442\u0441\u044f \u043b\u0438\u0431\u043e \u0441 <code>foo<\/code>, \u043b\u0438\u0431\u043e \u0441 <code>bar<\/code>, \u043b\u0438\u0431\u043e \u0441 <code>quux<\/code>. \u0412 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u043a\u0430\u0436\u0434\u043e\u0435 \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u0435 \u044d\u0442\u043e\u0433\u043e \u0440.\u0432. \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0441 \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u0437 \u0442\u0440\u0451\u0445 \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u043e\u0432.<\/p>\n<h4>\u041c\u043e\u0442\u0438\u0432\u0430\u0446\u0438\u044f \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u044c\u043d\u044b\u0445 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0439<\/h4>\n<p>\u0422\u0430\u043a \u043f\u043e\u0447\u0435\u043c\u0443 \u0436\u0435 \u044d\u0442\u043e \u0432\u0430\u0436\u043d\u043e? \u041f\u043e\u0447\u0435\u043c\u0443 \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u044b \u043d\u0430\u0441 \u0432\u043e\u043e\u0431\u0449\u0435 \u0437\u0430\u0431\u043e\u0442\u044f\u0442? \u0410 \u044d\u0442\u043e \u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0438\u0437 \u0434\u0432\u0443\u0445 \u043c\u044b\u0441\u043b\u0435\u0439:<\/p>\n<ol>\n<li>\n<p>\u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b \u043f\u043e\u0438\u0441\u043a\u0430 \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u043b\u0438 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0447\u0440\u0435\u0437\u0432\u044b\u0447\u0430\u0439\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u044b. \u0421\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043e\u0431\u044b\u0447\u043d\u043e \u0434\u043e\u0441\u0442\u0438\u0433\u0430\u0435\u0442\u0441\u044f \u0437\u0430 \u0441\u0447\u0451\u0442 \u044d\u043a\u0441\u043f\u043b\u0443\u0430\u0442\u0430\u0446\u0438\u0438 &#171;\u043f\u0440\u043e\u0441\u0442\u043e\u0442\u044b&#187; \u043f\u043e\u0438\u0441\u043a\u0430 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u043e\u0432 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c <a href=\"https:\/\/en.wikipedia.org\/wiki\/Single_instruction,_multiple_data\" rel=\"noopener noreferrer nofollow\">\u0432\u0435\u043a\u0442\u043e\u0440\u043d\u044b\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439<\/a> \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0441\u0440\u0430\u0437\u0443 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u0431\u0430\u0439\u0442 \u0441\u0442\u043e\u0433\u0430 \u0432 \u043e\u0434\u0438\u043d \u0448\u0430\u0433.<\/p>\n<\/li>\n<li>\n<p>\u0412 <em>\u043e\u0447\u0435\u043d\u044c<\/em> \u043e\u0431\u0449\u0438\u0445 \u0447\u0435\u0440\u0442\u0430\u0445, \u043d\u0435\u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b (general algorithms) \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u0439 \u0432 \u0440.\u0432. \u043d\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u044b \u043f\u0440\u043e\u0441\u0442\u044b\u043c\u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u0430\u043c\u0438.<\/p>\n<\/li>\n<\/ol>\n<p>\u041a\u043b\u044e\u0447\u0435\u0432\u043e\u0435 \u0443\u043c\u043e\u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043d\u0435 \u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u0438\u0435 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u0442\u0435\u0445\u043d\u0438\u043a \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0432\u0438\u0436\u043a\u0430 \u0440.\u0432. (\u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043a\u043e\u0441\u043d\u0451\u043c\u0441\u044f \u0431\u043e\u043b\u0435\u0435 \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u0435\u0435 \u043f\u043e\u0437\u0436\u0435), \u043d\u0438 \u043e\u0434\u043d\u0430 \u0438\u0437 \u043d\u0438\u0445 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0442\u0430\u043a\u043e\u0439 \u0436\u0435 \u0431\u044b\u0441\u0442\u0440\u043e\u0439, \u043a\u0430\u043a \u0445\u043e\u0440\u043e\u0448\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u043f\u043e\u0434\u0441\u0442\u0440\u043e\u043a\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0432\u0435\u043a\u0442\u043e\u0440\u043d\u044b\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439. \u041d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 \u044f \u0447\u0430\u0441\u0442\u043e \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0432\u0430\u043b \u0440\u0430\u0437\u043d\u0438\u0446\u0443 \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u043d\u0430 \u043e\u0434\u0438\u043d \u043f\u043e\u0440\u044f\u0434\u043e\u043a, \u0430 \u0438\u043d\u043e\u0433\u0434\u0430 \u0438 \u0431\u043e\u043b\u044c\u0448\u0435.<\/p>\n<h4>\u0418\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u0435 \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u043e\u0432<\/h4>\n<p>\u041f\u0440\u0438\u0432\u0435\u0434\u0443 \u043a\u043e\u0435-\u043a\u0430\u043a\u0438\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <code>regex-cli<\/code> \u0438 \u043f\u043e\u0434\u043a\u043e\u043c\u0430\u043d\u0434\u0443 <code>regex-cli debug literal<\/code> \u0434\u043b\u044f \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u044f \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u043e\u0432 \u0438\u0437 \u0440.\u0432. \u041d\u0430\u0447\u043d\u0451\u043c \u0441 \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e:<\/p>\n<pre><code>$ regex-cli debug literal 'bar'            parse time:  13.967\u00b5s        translate time:  7.008\u00b5s       extraction time:  405ns     optimization time:  1.479\u00b5s                   len:  Some(1)            is finite?:  true             is exact?:  true       min literal len:  Some(3)       max literal len:  Some(3) longest common prefix:  Some(\"bar\") longest common suffix:  Some(\"bar\")  E(\"bar\") <\/code><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435, \u044f \u0431\u0443\u0434\u0443 \u043e\u0431\u0440\u0435\u0437\u0430\u0442\u044c \u0432\u044b\u0432\u043e\u0434 \u043a\u043e\u043c\u0430\u043d\u0434\u044b, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043e\u043d\u0430 \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u0443\u0436 \u043e\u0447\u0435\u043d\u044c \u043c\u043d\u043e\u0433\u043e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438. \u041d\u0443 \u0442\u0435\u043f\u0435\u0440\u044c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f:<\/p>\n<ul>\n<li>\n<p>\u0412\u0440\u0435\u043c\u044f \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0430 (<code>parse time<\/code>) \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u0430 <code>bar<\/code> \u0432 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <a href=\"https:\/\/docs.rs\/regex-syntax\/0.7.*\/regex_syntax\/ast\/enum.Ast.html\" rel=\"noopener noreferrer nofollow\"><code>Ast<\/code><\/a>.<\/p>\n<\/li>\n<li>\n<p>\u0412\u0440\u0435\u043c\u044f \u0442\u0440\u0430\u043d\u0441\u043b\u044f\u0446\u0438\u0438 (<code>translate time<\/code>) \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f <code>Ast<\/code> \u0432 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <a href=\"https:\/\/docs.rs\/regex-syntax\/0.7.*\/regex_syntax\/hir\/struct.Hir.html\" rel=\"noopener noreferrer nofollow\"><code>Hir<\/code><\/a>.<\/p>\n<\/li>\n<li>\n<p>\u0412\u0440\u0435\u043c\u044f \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u044f (<code>extraction time<\/code>) \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0431\u044b\u043b\u043e \u0437\u0430\u0442\u0440\u0430\u0447\u0435\u043d\u043e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f <code>Hir<\/code> \u0432 <a href=\"https:\/\/docs.rs\/regex-syntax\/0.7.2\/regex_syntax\/hir\/literal\/struct.Seq.html\" rel=\"noopener noreferrer nofollow\">\u043b\u0438\u0442\u0435\u0440\u0430\u043b\u044c\u043d\u0443\u044e \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c<\/a>.<\/p>\n<\/li>\n<li>\n<p>\u0412\u0440\u0435\u043c\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 (<code>optimization time<\/code>) \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 &#171;\u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f&#187; \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u044c\u043d\u043e\u0439 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438. \u042d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043a\u0430\u043a \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435\u043c \u0434\u0443\u0431\u043b\u0438\u043a\u0430\u0442\u043e\u0432 \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u043e\u0432, \u0442\u0430\u043a \u0438 \u0442\u0430\u043a\u0438\u043c \u0430\u0433\u0440\u0435\u0441\u0441\u0438\u0432\u043d\u044b\u043c, \u043a\u0430\u043a \u0441\u043e\u043a\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c\u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u0430\u043c\u0438, \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u043c\u0438 \u043d\u0430 \u044d\u0432\u0440\u0438\u0441\u0442\u0438\u043a\u0430\u0445. \u041c\u044b \u0443\u0432\u0438\u0434\u0438\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u0437\u0436\u0435.<\/p>\n<\/li>\n<li>\n<p><code>len<\/code> &#8212; \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u043e\u0432 \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u044b\u043b\u0430 \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0430.<\/p>\n<\/li>\n<li>\n<p>\u0424\u043b\u0430\u0433 <code>is finite<\/code> \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0438\u043c\u0435\u0435\u0442 \u043b\u0438 \u0438\u0437\u0432\u043b\u0435\u0447\u0451\u043d\u043d\u0430\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432. \u0411\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u0430\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0432\u0441\u0435\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u043e\u0432, \u0438 \u044d\u0442\u043e \u043e\u0431\u044b\u0447\u043d\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u044c\u043d\u044b\u0435 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b \u043b\u0438\u0431\u043e \u043d\u0435 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0446\u0435\u043b\u0435\u0441\u043e\u043e\u0431\u0440\u0430\u0437\u043d\u044b\u043c\u0438.<\/p>\n<\/li>\n<li>\n<p>\u0424\u043b\u0430\u0433 <code>is exact<\/code> \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043b\u0438 \u043a\u0430\u0436\u0434\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0432 \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u044c\u043d\u043e\u0439 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0442\u043e\u0447\u043d\u044b\u043c \u0438\u043b\u0438 \u043d\u0435\u0442 (\u0447\u0438\u0442\u0430\u0439 \u0434\u0430\u043b\u0435\u0435, \u0442.\u043a. \u043a\u0440\u0430\u0442\u043a\u043e\u0435 \u043e\u0431\u044a\u044f\u0441\u043d\u0435\u043d\u0438\u0435 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0443\u0442\u0430\u043d\u043d\u043e \u0438\u043b\u0438 \u044f \u043f\u0440\u043e\u0441\u0442\u043e \u0442\u0443\u043f\u043e\u0439 \u0438 \u0435\u0433\u043e \u043d\u0435 \u043f\u043e\u043d\u044f\u043b, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u043f\u0443\u0441\u0442\u0438\u043b, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0432\u0432\u043e\u0434\u0438\u0442\u044c \u0441\u0435\u0431\u044f \u0438 \u043b\u044e\u0434\u0435\u0439 \u0432 \u0437\u0430\u0431\u043b\u0443\u0436\u0434\u0435\u043d\u0438\u0435 \u043d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u043c \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u043e\u043c &#8212; \u043f\u0440\u0438\u043c.) <em>An exact literal refers to a literal that reached a match state from the place where literal extraction began. Since this command extracts prefixes, an exact literal corresponds to an overall match of the regex. If a literal is not exact, then it is said to be inexact.<\/em><\/p>\n<\/li>\n<li>\n<p><code>min literal len<\/code> &#8212; \u0434\u043b\u0438\u043d\u0430 \u0432 \u0431\u0430\u0439\u0442\u0430\u0445 \u0441\u0430\u043c\u043e\u0433\u043e \u043a\u043e\u0440\u043e\u0442\u043a\u043e\u0433\u043e \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u0430 \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438.<\/p>\n<\/li>\n<li>\n<p><code>max literal len<\/code> &#8212; \u0434\u043b\u0438\u043d\u0430 \u0432 \u0431\u0430\u0439\u0442\u0430\u0445 \u0441\u0430\u043c\u043e\u0433\u043e \u0434\u043b\u0438\u043d\u043d\u043e\u0433\u043e \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u0430 \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438.<\/p>\n<\/li>\n<li>\n<p><code>longest common prefix<\/code> (\u043d\u0430\u0438\u0431\u043e\u043b\u044c\u0448\u0438\u0439 \u043e\u0431\u0449\u0438\u0439 \u043f\u0440\u0435\u0444\u0438\u043a\u0441) &#8212; \u043e\u0434\u0438\u043d\u043e\u0447\u043d\u044b\u0439 \u043b\u0438\u0442\u0435\u0440\u0430\u043b, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u043e\u043c \u0432\u0441\u0435\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438. \u0411\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0438 \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0435 \u043d\u0443\u043b\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432, \u043d\u0435 \u0438\u043c\u0435\u044e\u0442 \u043e\u0431\u0449\u0435\u0433\u043e \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u0430. \u0412\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0438\u043c\u0435\u044e\u0442 \u043e\u0431\u0449\u0438\u0439 \u043f\u0440\u0435\u0444\u0438\u043a\u0441, \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u0441\u043e\u0441\u0442\u043e\u044f\u0449\u0438\u0439 \u0438\u0437 \u043f\u0443\u0441\u0442\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438.<\/p>\n<\/li>\n<li>\n<p><code>longest common suffix<\/code> (\u043d\u0430\u0438\u0431\u043e\u043b\u044c\u0448\u0438\u0439 \u043e\u0431\u0449\u0438\u0439 \u0441\u0443\u0444\u0444\u0438\u043a\u0441) &#8212; \u043e\u0434\u0438\u043d\u043e\u0447\u043d\u044b\u0439 \u043b\u0438\u0442\u0435\u0440\u0430\u043b, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0443\u0444\u0444\u0438\u043a\u0441\u043e\u043c \u0432\u0441\u0435\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438. \u0411\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0438 \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0435 \u043d\u0443\u043b\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432, \u043d\u0435 \u0438\u043c\u0435\u044e\u0442 \u043e\u0431\u0449\u0435\u0433\u043e \u0441\u0443\u0444\u0444\u0438\u043a\u0441\u0430. \u0412\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0438\u043c\u0435\u044e\u0442 \u043e\u0431\u0449\u0438\u0439 \u0441\u0443\u0444\u0444\u0438\u043a\u0441, \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u0441\u043e\u0441\u0442\u043e\u044f\u0449\u0438\u0439 \u0438\u0437 \u043f\u0443\u0441\u0442\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438.<\/p>\n<\/li>\n<\/ul>\n<p>\u0418 \u043d\u0430\u043a\u043e\u043d\u0435\u0446, \u043f\u043e\u0441\u043b\u0435 \u0432\u0441\u0435\u0445 \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0445, \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u0430 \u0438\u0437\u0432\u043b\u0435\u0447\u0451\u043d\u043d\u0430\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c. \u0422.\u043a. \u0434\u0430\u043d\u043d\u043e\u0435 \u0440.\u0432. \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u043e \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u043e\u043c <code>bar<\/code>, \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043e\u0434\u0438\u043d\u043e\u0447\u043d\u044b\u0439 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u0443 <code>bar<\/code>. \u0415\u0441\u043b\u0438 <code>bar<\/code> \u044f\u0432\u043b\u044f\u043b\u0441\u044f \u0441\u0442\u0440\u043e\u0433\u0438\u043c \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u043e\u043c, \u0442\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0431\u044b\u043b\u0430 \u0431\u044b \u0442\u043e\u0439 \u0436\u0435 \u0441\u0430\u043c\u043e\u0439, \u043d\u043e \u0443\u0436\u0435 \u043d\u0435\u0442\u043e\u0447\u043d\u043e\u0439.<\/p>\n<pre><code>$ regex-cli debug literal --no-table 'bar+' I(\"bar\") <\/code><\/pre>\n<p>\u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, <code>bar<\/code> \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0435\u0442\u043e\u0447\u043d\u044b\u043c, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e <code>r<\/code> \u0432 \u043a\u043e\u043d\u0446\u0435 \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0442\u044c \u043e\u0434\u0438\u043d \u0438\u043b\u0438 \u0431\u043e\u043b\u0435\u0435 \u0440\u0430\u0437. \u0412 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u043d\u0435\u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u0432\u0442\u043e\u0440\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u043c\u0435\u043d\u0451\u043d \u043a \u043d\u0435\u043f\u0443\u0441\u0442\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435, \u0442\u043e \u044f\u0437\u044b\u043a, \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u0434\u0430\u043d\u043d\u044b\u043c \u0440.\u0432. \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u044b\u043c. \u041e\u0442\u0441\u044e\u0434\u0430 \u0441\u043b\u0435\u0434\u0443\u0435\u0442, \u0447\u0442\u043e \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0432\u0441\u0435 \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u044b, \u0438 \u0447\u0442\u043e, \u043f\u043e \u043a\u0440\u0430\u0439\u043d\u0435\u0439 \u043c\u0435\u0440\u0435, \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0437 \u043d\u0438\u0445, \u0431\u0443\u0434\u0443\u0447\u0438 \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u043d\u044b\u043c\u0438, \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0431\u0443\u0434\u0443\u0442 \u043d\u0435\u0442\u043e\u0447\u043d\u044b\u043c\u0438 (\u0435\u0441\u043b\u0438 \u0432\u043e\u043e\u0431\u0449\u0435 \u0431\u0443\u0434\u0443\u0442 \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u044b).<\/p>\n<p>\u041d\u043e \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u0440.\u0432., \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0449\u0435\u0435 \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0439 \u044f\u0437\u044b\u043a, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043d\u0435\u0442\u043e\u0447\u043d\u044b\u0439 \u043b\u0438\u0442\u0435\u0440\u0430\u043b. \u0412\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 \u0440.\u0432., \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0439 \u044f\u0437\u044b\u043a, \u043d\u043e \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0431\u0443\u0434\u0443\u0442 \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0442\u044c\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0435\u0442\u043e\u0447\u043d\u044b\u0435 \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u044b:<\/p>\n<pre><code>$ regex-cli debug literal --no-table 'bar[a-z]' I(\"bar\") <\/code><\/pre>\n<p>\u041f\u0440\u0438 \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u0438 \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u043e\u0432 <em>\u043c\u043e\u0436\u043d\u043e<\/em> \u043f\u043e\u0434\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043a\u0430\u0436\u0434\u044b\u0439 \u043b\u0438\u0442\u0435\u0440\u0430\u043b, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <code>bara<\/code>, <code>barb<\/code>, <code>barc<\/code>, &#8230;, <code>barz<\/code>. \u041d\u043e \u044d\u0442\u043e\u0433\u043e \u043d\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442. \u041f\u043e\u0447\u0435\u043c\u0443? \u041e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u0435 \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u043e\u0432 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0434\u043d\u043e\u0439 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u044d\u0432\u0440\u0438\u0441\u0442\u0438\u043a\u043e\u0439. \u0422\u0451\u043c\u043d\u043e\u0435 \u0438\u0441\u043a\u0443\u0441\u0441\u0442\u0432\u043e (dark art), \u0435\u0441\u043b\u0438 \u0445\u043e\u0442\u0438\u0442\u0435. \u041c\u044b \u0432\u044b\u043d\u0443\u0436\u0434\u0435\u043d\u044b \u0432\u0435\u0440\u043d\u0443\u0442\u044c\u0441\u044f \u043a \u0432\u043e\u043f\u0440\u043e\u0441\u0443 <em>\u043f\u043e\u0447\u0435\u043c\u0443<\/em> \u043c\u044b \u0432\u043e\u043e\u0431\u0449\u0435 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u0435 \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u043e\u0432: \u0447\u0442\u043e\u0431\u044b \u043e\u0447\u0435\u043d\u044c \u0431\u044b\u0441\u0442\u0440\u043e \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043d\u0434\u0438\u0434\u0430\u0442\u043e\u0432 \u043d\u0430 \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u0435 \u0432 \u0441\u0442\u043e\u0433\u0435 \u043f\u0435\u0440\u0435\u0434 \u0442\u0435\u043c, \u043a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u044b\u0439 \u0434\u0432\u0438\u0436\u043e\u043a \u0440.\u0432. \u0434\u043b\u044f \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u044f \u0442\u043e\u0433\u043e, \u0435\u0441\u0442\u044c \u043b\u0438 \u0432 \u044d\u0442\u043e\u043c \u043c\u0435\u0441\u0442\u0435 \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u0435.<\/p>\n<p>\u0428\u0442\u0443\u043a\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0432\u044b\u0431\u043e\u0440 <em>\u043a\u0430\u043a\u0438\u0435<\/em> \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u044b \u0438\u0441\u043a\u0430\u0442\u044c \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0442\u0430\u043a \u0436\u0435 \u0432\u0430\u0436\u0435\u043d, \u043a\u0430\u043a \u0438 \u0432\u044b\u0431\u043e\u0440 <em>\u043a\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c<\/em> \u0438\u0445 \u0438\u0441\u043a\u0430\u0442\u044c. \u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0441 \u0441\u0430\u043c\u043e\u0439 \u0432\u044b\u0441\u043e\u043a\u043e\u0439 \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u043d\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u044c\u044e \u043d\u0435 \u043f\u043e\u043c\u043e\u0436\u0435\u0442, \u0435\u0441\u043b\u0438 \u0441\u0442\u043e\u0433 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u043c\u0438\u043b\u043b\u0438\u043e\u043d\u0430 <code>a<\/code>, \u0430 \u0432\u0430\u0448\u0435 \u0440.\u0432. \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u043e\u043c <code>a<\/code>. \u041a\u043b\u044e\u0447\u0435\u0432\u043e\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0445\u043e\u0440\u043e\u0448\u0430\u044f \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u044c\u043d\u0430\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u0434\u043e\u0441\u0442\u0438\u0433\u0430\u0435\u0442 \u043e\u0431\u0435\u0438\u0445 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0446\u0435\u043b\u0435\u0439:<\/p>\n<ul>\n<li>\n<p>\u041c\u0438\u043d\u0438\u043c\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u0447\u0438\u0441\u043b\u043e \u043b\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043a\u0430\u043d\u0434\u0438\u0434\u0430\u0442\u043e\u0432. \u0422.\u0435. \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u043e\u0442\u043e\u0431\u0440\u0430\u043d\u043d\u044b\u0445 \u043a\u0430\u043d\u0434\u0438\u0434\u0430\u0442\u043e\u0432 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u044f\u043c\u0438.<\/p>\n<\/li>\n<li>\n<p>\u041c\u0438\u043d\u0438\u043c\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u0432\u043b\u0438\u044f\u043d\u0438\u0435 \u043d\u0430 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0443 \u043e\u0442 \u043f\u043e\u0438\u0441\u043a\u0430. \u0422.\u0435., \u043a\u043e\u0433\u0434\u0430 \u043f\u0440\u0435\u0444\u0438\u043b\u044c\u0442\u0440 \u0430\u043a\u0442\u0438\u0432\u0435\u043d, \u0432 \u0438\u0434\u0435\u0430\u043b\u0435 \u044d\u0442\u043e \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u0440\u0430\u0431\u043e\u0442\u0435 \u0434\u0432\u0438\u0436\u043a\u0430 \u0440.\u0432. \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0441\u0442\u043e\u0433\u0430. \u0415\u0441\u043b\u0438 \u043f\u0440\u0435\u0444\u0438\u043b\u044c\u0442\u0440 \u0447\u0430\u0441\u0442\u043e \u0441\u043e\u043e\u0431\u0449\u0430\u0435\u0442 \u043e \u043a\u0430\u043d\u0434\u0438\u0434\u0430\u0442\u0430\u0445, \u0442\u043e \u0434\u0430\u0436\u0435 \u043f\u0440\u0438 \u0440\u0435\u0439\u0442\u0435 \u043b\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0439 \u0432 0%, \u0432\u043b\u0438\u044f\u043d\u0438\u0435 \u043d\u0430 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0443 \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e \u0443\u0445\u0443\u0434\u0448\u0438\u0442 \u043e\u0431\u0449\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u043f\u043e\u0438\u0441\u043a\u0430.<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u0440\u0438\u0447\u0438\u043d\u0430, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u044f \u043d\u0430\u0437\u044b\u0432\u0430\u043b \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u044c\u043d\u044b\u0435 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 <em>\u0442\u0451\u043c\u043d\u044b\u043c \u0438\u0441\u043a\u0443\u0441\u0441\u0442\u0432\u043e\u043c<\/em> (dark art) \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0437\u043d\u0430\u0442\u044c \u0434\u043e \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043f\u043e\u0438\u0441\u043a \u043d\u0430\u0447\u043d\u0451\u0442\u0441\u044f, \u043a\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u0435\u0435 \u0432\u0441\u0435\u0433\u043e \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0438\u0437 \u0434\u0432\u0443\u0445 \u0432\u044b\u0448\u0435\u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0445 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0439. \u042d\u0442\u0438 \u043e\u0431\u0435 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438 \u0437\u0430\u0432\u0438\u0441\u044f\u0442 \u043e\u0442 \u0441\u0430\u043c\u043e\u0433\u043e \u0441\u0442\u043e\u0433\u0430, \u0438 \u0435\u0433\u043e \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0441 \u0446\u0435\u043b\u044c\u044e &#171;\u0438\u0437\u0443\u0447\u0435\u043d\u0438\u044f&#187; \u043f\u043e\u0447\u0442\u0438 \u0432\u0441\u0435\u0433\u0434\u0430 \u043d\u0435\u0433\u0430\u0442\u0438\u0432\u043d\u043e \u0432\u043b\u0438\u044f\u0435\u0442 \u043d\u0430 \u043e\u0431\u0449\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u043f\u043e\u0438\u0441\u043a\u0430. \u0421\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u043d\u0430\u043c \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0443\u0433\u0430\u0434\u044b\u0432\u0430\u0442\u044c, \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043b\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u0438 \u0432 \u0442\u043e\u0436\u0435 \u0432\u0440\u0435\u043c\u044f \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u044c \u0432\u043b\u0438\u044f\u043d\u0438\u0435 \u043d\u0430 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0443. \u0412\u043e\u0442 \u043f\u043e\u0447\u0435\u043c\u0443 \u044d\u0442\u043e \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u0451\u043c\u043d\u044b\u043c \u0438\u0441\u043a\u0443\u0441\u0441\u0442\u0432\u043e\u043c.<\/p>\n<p>\u041a \u0441\u0447\u0430\u0441\u0442\u044c\u044e, \u0435\u0441\u0442\u044c \u043a\u043e\u0435-\u043a\u0430\u043a\u0438\u0435 \u043e\u0431\u0449\u0438\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044b (guidelines), \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0445\u043e\u0440\u043e\u0448\u0438\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:<\/p>\n<ul>\n<li>\n<p>\u041c\u0435\u043d\u044c\u0448\u0430\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u043e\u0432 \u043e\u0431\u044b\u0447\u043d\u043e \u043b\u0443\u0447\u0448\u0435, \u0447\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0430\u044f, \u043d\u043e \u043d\u0435 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0447\u0440\u0435\u0437\u0432\u044b\u0447\u0430\u0439\u043d\u043e \u043a\u043e\u0440\u043e\u0442\u043a\u0438\u0435 (\u0442.\u0435. \u0434\u043b\u0438\u043d\u043e\u0439 1 \u0438\u043b\u0438 2 \u0431\u0430\u0439\u0442\u0430). \u041a\u043e\u0440\u043e\u0442\u043a\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u0435\u0435 \u0431\u0443\u0434\u0443\u0442 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0447\u0430\u0441\u0442\u043e, \u0438 \u0432 \u0442\u0430\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0442\u0438\u0442\u0435\u043b\u044c\u043d\u0435\u0435 \u043e\u0442 \u043d\u0438\u0445 \u043e\u0442\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0443 \u043d\u0430\u0441 5000 \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u0441\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u044e\u0442\u0441\u044f ASCII \u0441\u0438\u043c\u0432\u043e\u043b\u0430\u043c\u0438 \u0432 \u043d\u0438\u0436\u043d\u0435\u043c \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0435. \u041c\u044b \u043c\u043e\u0433\u043b\u0438 \u0431\u044b \u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u043e \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u044c \u0447\u0438\u0441\u043b\u043e \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u043e\u0432 \u043a \u043f\u043e\u0447\u0442\u0438 26, \u0432\u0437\u044f\u0432 \u043f\u0435\u0440\u0432\u044b\u0439 \u0431\u0430\u0439\u0442 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u0430. \u041d\u043e \u044d\u0442\u0430 \u043d\u043e\u0432\u0430\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u043e\u0432 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u044f \u0431\u043e\u043b\u0435\u0435 \u0447\u0430\u0441\u0442\u043e, \u0447\u0442\u043e \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u0442 \u043a \u0443\u0434\u0430\u0440\u0443 \u043f\u043e \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0435 \u0438 \u043a \u0431\u043e\u043b\u0435\u0435 \u0432\u044b\u0441\u043e\u043a\u043e\u043c\u0443 \u0440\u0435\u0439\u0442\u0443 \u043b\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0439. \u0418 \u0431\u044b\u043b\u043e \u0431\u044b \u043b\u0443\u0447\u0448\u0435 \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u043e\u0441\u0442\u0430\u0432\u0438\u0432 \u0431\u043e\u043b\u0435\u0435 \u0434\u043b\u0438\u043d\u043d\u044b\u0435 \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441 \u043c\u0435\u043d\u044c\u0448\u0435\u0439 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c\u044e \u0431\u0443\u0434\u0443\u0442 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u0435.<\/p>\n<\/li>\n<li>\n<p>\u0414\u043b\u0438\u043d\u043d\u044b\u0435 \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u044b \u0432 \u043e\u0431\u0449\u0435\u043c \u043b\u0443\u0447\u0448\u0435, \u0447\u0435\u043c \u043a\u043e\u0440\u043e\u0442\u043a\u0438\u0435, \u043d\u043e \u043d\u0435 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u0433\u0440\u043e\u043c\u043d\u044b\u0445 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0435\u0439. \u0414\u043b\u0438\u043d\u043d\u044b\u0435 \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u044b \u043e\u0431\u044b\u0447\u043d\u043e \u0431\u043e\u043b\u0435\u0435 \u0438\u0437\u0431\u0438\u0440\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435, \u0442.\u0435. \u043e\u043d\u0438 \u043f\u0440\u0438\u0432\u043e\u0434\u044f\u0442 \u043a \u0431\u043e\u043b\u0435\u0435 \u043c\u0435\u043d\u044c\u0448\u0435\u043c\u0443 \u0440\u0435\u0439\u0442\u0443 \u043b\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u0439, \u0442.\u043a. \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u0438\u0445 \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u044f \u043c\u0435\u043d\u044c\u0448\u0435. \u041d\u043e \u043d\u0438\u043a\u0442\u043e \u043d\u0435 \u0445\u043e\u0447\u0435\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u043e \u043e\u0442\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442 \u0434\u043b\u0438\u043d\u043d\u044b\u043c \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u0430\u043c. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0443 \u0432\u0430\u0441 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c <code>foobar<\/code>, <code>foobaz<\/code>, <code>fooquux<\/code>, \u043d\u043e \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0430\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u0431\u0443\u0434\u0435\u0442 <code>foo<\/code> \u0434\u0430\u0436\u0435 \u0441 \u0443\u0447\u0451\u0442\u043e\u043c \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043e\u043d\u0430 \u043a\u043e\u0440\u043e\u0447\u0435 \u0432\u0441\u0435\u0445 \u0442\u0440\u0451\u0445 \u044d\u0442\u0438\u0445 \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u043e\u0432. \u041e\u0434\u0438\u043d \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0445\u043e\u0440\u043e\u0448 \u0442\u0435\u043c, \u0447\u0442\u043e \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u043e\u0434\u0438\u043d\u043e\u0447\u043d\u043e\u0439 \u043f\u043e\u0434\u0441\u0442\u0440\u043e\u043a\u0438 (\u043a\u043e\u0442\u043e\u0440\u044b\u0439, \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u0431\u044b\u0441\u0442\u0440\u044b\u0439).<\/p>\n<\/li>\n<\/ul>\n<p>\u0418\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u0435 \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u043e\u0432 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0438\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0432\u044b\u0448\u0435\u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0445 \u043f\u043e\u0434\u0445\u043e\u0434\u043e\u0432, \u043d\u043e \u0435\u0441\u0442\u044c \u0438 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u0440\u0443\u0433\u0438\u0435 \u044d\u0432\u0440\u0438\u0441\u0442\u0438\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0447\u0430\u0441\u0442\u043e \u0432\u0441\u0442\u0443\u043f\u0430\u044e\u0442 \u0432 \u0438\u0433\u0440\u0443. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, ASCII \u043f\u0440\u043e\u0431\u0435\u043b (<code>U+0020<\/code>) \u043d\u0435\u043e\u0431\u044b\u0447\u043d\u043e \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0451\u043d\u043d\u044b\u0439. \u0415\u0441\u043b\u0438 \u0431\u044b \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043b\u0430 \u043f\u0440\u043e\u0431\u0435\u043b, \u0442\u043e\u0433\u0434\u0430 \u0431\u044b \u043e\u043d\u0430 \u0441\u0442\u0430\u043b\u0430 \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0439 \u043f\u043e\u0441\u043b\u0435 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438, \u0438 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u0435\u0435 \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u044c\u043d\u0443\u044e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044e. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u044d\u0442\u043e \u0440.\u0432., \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u0442\u0441\u044f \u0442\u0440\u0438 \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u043d\u044b\u0445 \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u0430:<\/p>\n<pre><code>$ regex-cli debug literal --no-table '(?:foo|z|bar)[a-z]+' I(\"foo\") I(\"z\") I(\"bar\") <\/code><\/pre>\n<p>\u0410 \u0432\u043e\u0442 \u0432 \u044d\u0442\u043e\u043c \u0440.\u0432. \u044d\u0442\u043e\u0433\u043e \u043d\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442. \u0420\u0430\u0437\u043d\u0438\u0446\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e <code>z<\/code> \u0437\u0430\u043c\u0435\u043d\u0438\u043b\u0438 \u043f\u0440\u043e\u0431\u0435\u043b\u043e\u043c:<\/p>\n<pre><code>$ regex-cli debug literal --no-table '(?:foo| |bar)[a-z]+' Seq[\u221e] <\/code><\/pre>\n<p>\u042d\u0442\u0430 \u044d\u0432\u0440\u0438\u0441\u0442\u0438\u043a\u0430 \u0443\u0447\u0430\u0441\u0442\u0432\u0443\u0435\u0442 \u0432\u043e \u0432\u0440\u0435\u043c\u044f &#171;\u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u0443\u044e\u0449\u0435\u0433\u043e&#187; \u043f\u0440\u043e\u0445\u043e\u0434\u0430 \u043f\u043e \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u044c\u043d\u043e\u0439 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438. \u042d\u0432\u0440\u0438\u0441\u0442\u0438\u043a\u0430 \u043f\u0440\u0438\u043d\u044f\u043b\u0430 \u0432\u043e \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u043e\u0434\u0438\u043d \u0438\u0437 \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u043e\u0432 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u043e\u0431\u0435\u043b\u044c\u043d\u044b\u043c \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432, \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043b\u0430, \u0447\u0442\u043e \u044d\u0442\u043e \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u0442 \u043a \u0431\u043e\u043b\u0435\u0435 \u0432\u044b\u0441\u043e\u043a\u043e\u043c\u0443 \u0440\u0435\u0439\u0442\u0443 \u043b\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u0439, \u0438 \u0441\u0434\u0435\u043b\u0430\u043b\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0439. \u041a\u043e\u0433\u0434\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u0430, \u044d\u0442\u043e \u0441\u043e\u043e\u0431\u0449\u0430\u0435\u0442, \u0447\u0442\u043e \u043d\u0435\u0442 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u043d\u0430\u0431\u043e\u0440\u0430 \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0445 \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 (\u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e) \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0445\u043e\u0440\u043e\u0448\u0435\u0433\u043e \u043f\u0440\u0435\u0444\u0438\u043b\u044c\u0442\u0440\u0430. \u0415\u0441\u043b\u0438 \u043c\u044b \u043e\u0442\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044e, \u0442\u043e \u043c\u043e\u0436\u0435\u043c \u0443\u0432\u0438\u0434\u0435\u0442\u044c, \u0447\u0442\u043e \u043f\u0440\u043e\u0431\u0435\u043b\u044c\u043d\u044b\u0439 \u0441\u0438\u043c\u0432\u043e\u043b \u0432\u0445\u043e\u0434\u0438\u0442 \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c:<\/p>\n<pre><code>$ regex-cli debug literal --no-table --no-optimize '(?:foo| |bar)[a-z]+' I(\"foo\") I(\" \") I(\"bar\") <\/code><\/pre>\n<p>\u0427\u0442\u043e\u0431\u044b \u0435\u0449\u0451 \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u0441\u0451 \u0443\u0441\u043b\u043e\u0436\u043d\u0438\u0442\u044c, \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0434\u0440\u0443\u0433\u043e\u0435 \u0440.\u0432., \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u0442 \u043a \u043c\u0430\u043b\u043e\u0439 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0439 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u0441\u0435 \u0431\u0443\u0434\u0443\u0442 \u044f\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0442\u043e\u0447\u043d\u044b\u043c\u0438. \u041d\u043e \u043b\u0438\u0442\u0435\u0440\u0430\u043b, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u043f\u0440\u043e\u0431\u0435\u043b, \u043d\u0435 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u0432\u0441\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0439.<\/p>\n<pre><code>$ regex-cli debug literal --no-table 'foo| |bar' E(\"foo\") E(\" \") E(\"bar\") <\/code><\/pre>\n<p>\u042d\u0442\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u043e, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0432\u0441\u0435 \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u044b \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0442\u043e\u0447\u043d\u044b\u043c\u0438, \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u0432\u0438\u0436\u043a\u0430 \u0440.\u0432. \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c. \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0438\u043a\u0430\u043a\u043e\u0433\u043e \u043f\u0440\u0435\u0444\u0438\u043b\u044c\u0442\u0440\u0430. \u041c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0434\u043b\u044f \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u043f\u043e\u0434\u0441\u0442\u0440\u043e\u043a, \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u0439\u0442\u0438 \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u044f. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0431\u0435\u0441\u043f\u043e\u043a\u043e\u0439\u0441\u0442\u0432\u043e \u043e \u0431\u043e\u043b\u044c\u0448\u043e\u043c \u0440\u0435\u0439\u0442\u0435 \u043b\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u0439 \u0441\u043e\u0432\u0441\u0435\u043c \u043d\u0435 \u043a \u043c\u0435\u0441\u0442\u0443, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043a\u0430\u0436\u0434\u043e\u0435 \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043d\u0430\u0439\u0434\u0451\u0442 \u043f\u043e\u0438\u0441\u043a \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u043e\u0432, \u0431\u0443\u0434\u0435\u0442 \u044f\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u043c \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u0435\u043c.<\/p>\n<p>\u0422\u0443\u0442 \u0441\u0442\u043e\u0438\u0442 \u043f\u043e\u044f\u0441\u043d\u0438\u0442\u044c, \u043f\u043e\u0447\u0435\u043c\u0443 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u0442\u0435\u0440\u043c\u0438\u043d \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u044c\u043d\u0430\u044f <em>\u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c<\/em> \u0432\u043c\u0435\u0441\u0442\u043e \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u044c\u043d\u043e\u0433\u043e <em>\u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430<\/em>. \u0410 \u0438\u043c\u0435\u043d\u043d\u043e, \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u0438\u0437\u0432\u043b\u0435\u0447\u0451\u043d\u043d\u044b\u0445 \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u043e\u0432 \u0438\u043c\u0435\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. \u042d\u0442\u043e \u0438\u043c\u0435\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043a\u0440\u0435\u0439\u0442 <code>regex<\/code> \u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u0441\u0438\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c Perl-\u043f\u043e\u0434\u043e\u0431\u043d\u0443\u044e \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u043a\u0443. \u0422.\u0435. \u043e \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u044f\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f, \u0441\u043e\u043e\u0431\u0449\u0430\u0435\u0442\u0441\u044f <em>\u0442\u0430\u043a, \u043a\u0430\u043a \u0435\u0441\u043b\u0438 \u0431\u044b<\/em> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0441\u044f \u043f\u043e\u0438\u0441\u043a \u0441 \u0432\u043e\u0437\u0432\u0440\u0430\u0442\u043e\u043c (backtracking search). \u042d\u0442\u043e \u0442\u0430\u043a \u0436\u0435 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f leftmost-first \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u044f\u043c\u0438, \u0438 \u0432 \u044d\u0442\u043e\u043c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435, \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 <code>|<\/code> \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u043e\u043c\u043c\u0443\u0442\u0430\u0442\u0438\u0432\u043d\u044b\u043c. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<pre><code>$ regex-cli debug literal --no-table 'sam|samwise' E(\"sam\")  $ regex-cli debug literal --no-table 'samwise|sam' E(\"samwise\") E(\"sam\") <\/code><\/pre>\n<p>\u0422\u0443\u0442 \u0434\u0432\u0435 \u0440\u0430\u0437\u043d\u044b\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438. \u0412 \u043f\u0435\u0440\u0432\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, <code>sam|samwise<\/code> \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u043c\u0430\u0442\u0447\u0438\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0430\u0441\u0442\u044c <code>sam<\/code>, \u0442.\u043a. <code>sam<\/code> \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u043e\u043c <code>samwise<\/code> \u0438 \u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u0435 \u0438\u0434\u0451\u0442 \u0432 \u043d\u0430\u0447\u0430\u043b\u0435. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u044c\u043d\u0430\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u0441\u043e\u0441\u0442\u043e\u044f\u0449\u0430\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u0437 <code>sam<\/code>, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0439, \u0442.\u043a. <code>samwise<\/code> \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0441\u043e\u0432\u043f\u0430\u0434\u0451\u0442. \u0412\u043e \u0432\u0442\u043e\u0440\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, <code>samwise|sam<\/code> \u043c\u043e\u0436\u0435\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u043e\u0431\u0435 \u0432\u0435\u0442\u043a\u0438. \u0414\u0430\u0436\u0435 \u043f\u0440\u0438 \u0442\u043e\u043c, \u0447\u0442\u043e <code>sam<\/code> \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u043e\u043c <code>samwise<\/code>, \u0438\u0437-\u0437\u0430 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e <code>samwise<\/code> \u0438\u0434\u0451\u0442 \u043f\u0435\u0440\u0432\u044b\u043c, \u043e\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0442\u0438\u0442\u0435\u043b\u044c\u043d\u0435\u0435 \u0434\u043b\u044f \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u044f \u0441\u043e \u0441\u0442\u0440\u043e\u043a\u043e\u0439 <code>samwise<\/code> \u0432 \u0441\u0442\u043e\u0433\u0435.<\/p>\n<p>(\u0417\u0430\u043c\u0435\u0442\u043a\u0430: POSIX \u0434\u0432\u0438\u0436\u043a\u0438 \u0440.\u0432. \u043d\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u0440.\u0432. \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c. \u0412\u043c\u0435\u0441\u0442\u043e \u044d\u0442\u043e\u0433\u043e, \u0432 \u043d\u0438\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f leftmost-longest \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u043a\u0438, \u043a\u043e\u0433\u0434\u0430 \u0441\u0430\u043c\u043e\u0435 \u0434\u043b\u0438\u043d\u043d\u043e\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0435 \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u0435 \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0442\u0438\u0442\u0435\u043b\u044c\u043d\u0435\u0435. \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 <code>|<\/code> \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u043e\u043c\u043c\u0443\u0442\u0430\u0442\u0438\u0432\u043d\u044b\u043c. \u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u0440\u0443\u0433\u0438\u0435 \u0434\u0432\u0438\u0436\u043a\u0438, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a <a href=\"https:\/\/github.com\/intel\/hyperscan\" rel=\"noopener noreferrer nofollow\">Hyperscan<\/a> \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0442 \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u043a\u0438 &#171;\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0432\u0441\u0435 \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u044f&#187; \u0438\u043b\u0438 &#171;\u0441\u0430\u043c\u043e\u0435 \u0440\u0430\u043d\u043d\u0435\u0435 \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u0435&#187;. \u0412 \u0442\u0430\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0430 \u0441\u0442\u043e\u0433\u0435 <code>abc<\/code> \u043f\u043e \u0440.\u0432. <code>abc|a<\/code> \u0431\u0443\u0434\u0435\u0442 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0435\u043d\u043e \u043e\u0431\u0430 \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u044f <code>a<\/code> \u0438 <code>abc<\/code>).<\/p>\n<p>\u041d\u0430\u0448\u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442, \u0447\u0442\u043e \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u0435 \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u043e\u0432 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0440\u0430\u0437\u0443\u043c\u043d\u043e. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<pre><code>$ regex-cli debug literal --no-table 'abc?de?[x-z]ghi' I(\"abcde\") I(\"abcdx\") I(\"abcdy\") I(\"abcdz\") I(\"abdex\") I(\"abdey\") I(\"abdez\") I(\"abdxg\") I(\"abdyg\") I(\"abdzg\") <\/code><\/pre>\n<p>\u0422.\u0435. \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u0435 \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u043e\u0432 \u0437\u043d\u0430\u0435\u0442, \u043a\u0430\u043a \u0440\u0430\u0441\u043a\u0440\u044b\u0432\u0430\u0442\u044c \u0448\u0442\u0443\u043a\u0438 \u0432\u0440\u043e\u0434\u0435 <code>?<\/code> \u0438 \u0434\u0430\u0436\u0435 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u043a\u043b\u0430\u0441\u0441\u044b \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432. \u042d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0434\u043e \u0442\u0435\u0445 \u043f\u043e\u0440, \u043f\u043e\u043a\u0430 \u0440\u0430\u0437\u043c\u0435\u0440 \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u044c\u043d\u043e\u0439 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u0445 <a href=\"https:\/\/docs.rs\/regex-syntax\/latest\/regex_syntax\/hir\/literal\/struct.Extractor.html\" rel=\"noopener noreferrer nofollow\">\u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0440\u0430\u0437\u043d\u044b\u0445 \u044d\u0432\u0440\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439<\/a>. (\u0417\u0430\u043c\u0435\u0447\u0443, \u0447\u0442\u043e \u0442\u0430\u043a \u0436\u0435 \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u0435 \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u043e\u0432 \u043c\u043e\u0436\u0435\u0442 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u043a\u0430\u0436\u0434\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u044f\u0437\u044b\u043a\u0430, \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u043c \u0440.\u0432., \u043d\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u0432\u044b\u0431\u0440\u0430\u043b\u0430 \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u0441 \u044d\u0432\u0440\u0438\u0441\u0442\u0438\u043a\u043e\u0439.)<\/p>\n<p>\u0414\u0440\u0443\u0433\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 &#171;\u0438\u043d\u0442\u0435\u043b\u043b\u0435\u043a\u0442\u0430&#187; \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u042e\u043d\u0438\u043a\u043e\u0434\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0442\u0430\u043a \u0436\u0435 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f:<\/p>\n<pre><code>$ regex-cli debug literal --no-table '(?i)She' E(\"SHE\") E(\"SHe\") E(\"ShE\") E(\"She\") E(\"sHE\") E(\"sHe\") E(\"shE\") E(\"she\") E(\"\u017fHE\") E(\"\u017fHe\") E(\"\u017fhE\") E(\"\u017fhe\") <\/code><\/pre>\n<p>\u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u044d\u0442\u043e \u043d\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u044f \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u043e\u0432, \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0449\u0443\u044e Unicode case folding, \u0430 \u0441\u043a\u043e\u0440\u0435\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0442\u0440\u0430\u043d\u0441\u043b\u044f\u0446\u0438\u0438 \u0438\u0437 <code>Ast<\/code> \u0432 <code>Hir<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0442\u0430\u043a \u0436\u0435 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442 case folding:<\/p>\n<pre><code>$ regex-cli debug hir --no-table '(?i)She' Concat(     [         Class(             {                 'S'..='S',                 's'..='s',                 '\u017f'..='\u017f',             },         ),         Class(             {                 'H'..='H',                 'h'..='h',             },         ),         Class(             {                 'E'..='E',                 'e'..='e',             },         ),     ], ) <\/code><\/pre>\n<p>\u0422.\u0435. \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u0435 \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u043e\u0432 \u0432\u043e\u0441\u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u043e\u0435 \u0440.\u0432. \u043a\u0430\u043a \u0447\u0442\u043e-\u0442\u043e \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u043d\u043e\u0435 <code>[Ss\u017f][Hh][Ee]<\/code>. \u0418 \u0432\u0441\u0451, \u0447\u0442\u043e \u043e\u043d\u043e \u0434\u0435\u043b\u0430\u0435\u0442 &#8212; \u044d\u0442\u043e \u0440\u0430\u0441\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u043a\u043b\u0430\u0441\u0441\u044b \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432, \u043a\u0430\u043a \u0438 \u0432 \u043b\u044e\u0431\u043e\u043c \u0434\u0440\u0443\u0433\u043e\u043c \u0440.\u0432.<\/p>\n<h4>\u041f\u043e\u0438\u0441\u043a \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u043e\u0432<\/h4>\n<p>\u041a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u043c\u044b \u0438\u0437\u0432\u043b\u0435\u043a\u043b\u0438 \u043a\u043e\u0435-\u043a\u0430\u043a\u0438\u0435 \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u044b, \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0434\u043d\u044f\u0442\u044c, \u043a\u0430\u043a \u0438\u0445 \u0442\u0435\u043f\u0435\u0440\u044c \u0438\u0441\u043a\u0430\u0442\u044c.<\/p>\n<p>\u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u0434\u0438\u043d\u043e\u0447\u043d\u043e\u0439 \u043f\u043e\u0434\u0441\u0442\u0440\u043e\u043a\u0438 \u044d\u0442\u043e \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0447\u0435\u043c-\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u044b\u043c: \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0441\u0430\u043c\u044b\u0439 \u0431\u044b\u0441\u0442\u0440\u044b\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043f\u043e\u0438\u0441\u043a\u0430 \u043f\u043e\u0434\u0441\u0442\u0440\u043e\u043a\u0438 \u0432 \u0441\u0442\u043e\u0433\u0435 \u0438\u0437 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445, \u043d\u0435 \u0431\u043e\u043b\u0435\u0435 \u0442\u043e\u0433\u043e. \u041d\u0435 \u043d\u0443\u0436\u043d\u043e \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u043e\u0432, \u0442.\u043a. \u0443 \u043d\u0430\u0441 \u043e\u043d \u0432\u0441\u0435\u0433\u043e \u043e\u0434\u0438\u043d. \u041d\u0430 \u044d\u0442\u043e\u0442 \u0441\u043b\u0443\u0447\u0430\u0439 \u043a\u0440\u0435\u0439\u0442 <code>regex<\/code> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043c\u043e\u0434\u0443\u043b\u044c <a href=\"https:\/\/docs.rs\/memchr\/2.*\/memchr\/memmem\/index.html\" rel=\"noopener noreferrer nofollow\"><code>memmem<\/code><\/a> \u0438\u0437 \u043a\u0440\u0435\u0439\u0442\u0430 <a href=\"https:\/\/docs.rs\/memchr\/2.*\/memchr\/\" rel=\"noopener noreferrer nofollow\"><code>memchr<\/code><\/a>.<\/p>\n<p>\u0415\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437\u043d\u044b\u0445 \u0430\u0441\u043f\u0435\u043a\u0442\u043e\u0432, \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u043c\u0443 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0443 \u0438\u0437 <code>memchr::memmem<\/code>:<\/p>\n<ul>\n<li>\n<p>\u0415\u0433\u043e \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u043c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c <a href=\"https:\/\/en.wikipedia.org\/wiki\/Two-way_string-matching_algorithm\" rel=\"noopener noreferrer nofollow\">Two-Way<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0432 \u0445\u0443\u0434\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0437\u0430 <code>O(n)<\/code> \u0438 \u0438\u043c\u0435\u0435\u0442 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u043d\u0443\u044e \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u043e \u043f\u0430\u043c\u044f\u0442\u0438.<\/p>\n<\/li>\n<li>\n<p>\u0412 \u0441\u043b\u0443\u0447\u0430\u0435, \u043a\u043e\u0433\u0434\u0430 \u0438\u0441\u043a\u043e\u043c\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 (needle &#8212; \u0438\u0433\u043e\u043b\u043a\u0430, \u0434\u0430\u043b\u0435\u0435 \u0434\u043b\u044f \u043a\u0440\u0430\u0442\u043a\u043e\u0441\u0442\u0438 \u0438.\u0441.) \u0438 \u0441\u0442\u043e\u0433 \u043e\u0447\u0435\u043d\u044c \u043a\u043e\u0440\u043e\u0442\u043a\u0438\u0435, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c <a href=\"https:\/\/en.wikipedia.org\/wiki\/Rabin%E2%80%93Karp_algorithm\" rel=\"noopener noreferrer nofollow\">\u0420\u0430\u0431\u0438\u043d\u0430-\u041a\u0430\u0440\u043f\u0430<\/a>.<\/p>\n<\/li>\n<li>\n<p>\u041d\u0430 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435 <code>x86_64<\/code> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 <a href=\"http:\/\/0x80.pl\/articles\/simd-strfind.html\" rel=\"noopener noreferrer nofollow\">&#171;SIMD \u043e\u0431\u0449\u0435\u0433\u043e \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f&#187;<\/a>. \u0412 \u043e\u0431\u0449\u0438\u0445 \u0447\u0435\u0440\u0442\u0430\u0445: \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0434\u0432\u0430 \u0431\u0430\u0439\u0442\u0430 \u0438\u0437 \u0438.\u0441. (\u043f\u0440\u0438\u043c. &#8212; \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u043d\u0435 \u0441\u043e\u0441\u0435\u0434\u043d\u0438\u0445), \u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0432\u0435\u043a\u0442\u043e\u0440\u043d\u044b\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439 \u0438\u0449\u0435\u0442\u0441\u044f \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u044d\u0442\u0438\u0445 \u0434\u0432\u0443\u0445 \u0431\u0430\u0439\u0442 \u0432 \u043d\u0443\u0436\u043d\u044b\u0445 \u043f\u043e\u0437\u0438\u0446\u0438\u044f\u0445. \u041a\u043e\u0433\u0434\u0430 \u043d\u0430\u0439\u0434\u0435\u043d\u044b \u044d\u0442\u0438 \u0434\u0432\u0430 \u0431\u0430\u0439\u0442\u0430, \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u043b\u043d\u043e\u0435 \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u0435 \u0441 \u0438.\u0441. (\u0417\u0430\u043c\u0435\u0442\u0438\u043c, \u0447\u0442\u043e \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u0440\u0443\u0433\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u0430 \u043f\u0440\u0435\u0444\u0438\u043b\u044c\u0442\u0440\u0430. \u041c\u044b \u0441\u043f\u0435\u0440\u0432\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0431\u044b\u0441\u0442\u0440\u044b\u0439 \u043f\u043e\u0438\u0441\u043a \u043a\u0430\u043d\u0434\u0438\u0434\u0430\u0442\u043e\u0432, \u0430 \u0437\u0430\u0442\u0435\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0448\u0430\u0433 \u0431\u043e\u043b\u0435\u0435 \u0437\u0430\u0442\u0440\u0430\u0442\u043d\u043e\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438.)<\/p>\n<\/li>\n<\/ul>\n<p>\u0414\u043b\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 SIMD \u043e\u0431\u0449\u0435\u0433\u043e \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u0432\u043c\u0435\u0441\u0442\u043e \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0432\u0441\u0435\u0433\u0434\u0430 \u0432\u044b\u0431\u0438\u0440\u0430\u0442\u044c \u043f\u0435\u0440\u0432\u044b\u0439 \u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0431\u0430\u0439\u0442 \u0432 \u0438.\u0441., \u043c\u044b \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u0434\u0432\u0430 &#171;\u0440\u0435\u0434\u043a\u0438\u0445&#187; \u0431\u0430\u0439\u0442\u0430, \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435\u043c. \u0422.\u0435. \u043c\u044b \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u043c, \u0447\u0442\u043e \u0431\u0430\u0439\u0442\u044b \u0442\u0438\u043f\u0430 <code>Z<\/code> \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u044e\u0442\u0441\u044f \u0440\u0435\u0436\u0435, \u0447\u0435\u043c \u0431\u0430\u0439\u0442\u044b \u0442\u0438\u043f\u0430 <code>a<\/code>. \u042d\u0442\u043e \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0442\u0430\u043a, \u043d\u043e \u043c\u044b \u0442\u0443\u0442 \u043d\u0430 \u0442\u0435\u0440\u0440\u0438\u0442\u043e\u0440\u0438\u0438 \u044d\u0432\u0440\u0438\u0441\u0442\u0438\u043a\u0438. \u042d\u0442\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0445\u043e\u0440\u043e\u0448\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435. \u0412\u044b\u0431\u0438\u0440\u0430\u044f \u0431\u0430\u0439\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e \u0440\u0435\u0434\u043a\u043e \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u044e\u0442\u0441\u044f \u0432 \u0438.\u0441., \u043c\u044b \u043d\u0430\u0434\u0435\u0435\u043c\u0441\u044f \u043c\u0430\u043a\u0441\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0440\u0435\u043c\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u043a\u0430\u043d\u0434\u0438\u0434\u0430\u0442\u043e\u0432, \u0437\u0430\u0442\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u043c\u043e\u0435 \u0432\u0435\u043a\u0442\u043e\u0440\u043d\u044b\u043c\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f\u043c\u0438, \u0438 \u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0447\u0438\u0441\u043b\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430\u0434\u043e \u0431\u0443\u0434\u0435\u0442 \u0441\u0434\u0435\u043b\u0430\u0442\u044c.<\/p>\n<p>\u0421\u043b\u0443\u0447\u0430\u0439 \u0441 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e\u043c \u043f\u043e\u0434\u0441\u0442\u0440\u043e\u043a \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0441\u043b\u043e\u0436\u043d\u0435\u0435: \u043d\u0443\u0436\u043d\u043e \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u044b \u043a\u0430\u043a \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0438 \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0437\u0438\u0440\u0443\u0435\u043c \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u044f \u0431\u043e\u043b\u0435\u0435 \u0440\u0430\u043d\u043d\u0438\u0445 \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u043e\u0432 \u043d\u0430\u0434 \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u044f\u043c\u0438 \u0441 \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0434\u0443\u0442 \u043f\u043e\u0437\u0436\u0435. \u0422\u0430\u043a \u0436\u0435 \u043e\u0431\u044b\u0447\u043d\u043e \u0432\u0435\u0440\u043d\u043e \u0442\u043e, \u0447\u0442\u043e \u043f\u043e\u0438\u0441\u043a \u043f\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c \u043f\u043e\u0434\u0441\u0442\u0440\u043e\u043a\u0430\u043c \u0431\u0443\u0434\u0435\u0442 \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u0435\u0435, \u0447\u0435\u043c \u043f\u043e\u0438\u0441\u043a \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0439 \u043f\u043e\u0434\u0441\u0442\u0440\u043e\u043a\u0438, \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 \u0440\u0430\u0431\u043e\u0442\u044b. \u041e\u0441\u043d\u043e\u0432\u043d\u044b\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u043c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f <a href=\"https:\/\/github.com\/BurntSushi\/aho-corasick\/tree\/97e48b6dbdf9ebd50168540276fa3f14f403d42b\/src\/packed\/teddy\" rel=\"noopener noreferrer nofollow\">Teddy<\/a>, \u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043c\u043d\u043e\u0439 \u0438\u0437 <a href=\"https:\/\/github.com\/intel\/hyperscan\" rel=\"noopener noreferrer nofollow\">Hyperscan<\/a>. \u041d\u0430 \u0432\u044b\u0441\u043e\u043a\u043e\u043c \u0443\u0440\u043e\u0432\u043d\u0435 \u043e\u043d \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0432\u0435\u043a\u0442\u043e\u0440\u043d\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u043a\u0430\u043d\u0434\u0438\u0434\u0430\u0442\u043e\u0432, \u0430 \u0437\u0430\u0442\u0435\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0438\u0445 \u0434\u043b\u044f \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u044f \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u044f.<\/p>\n<p>\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c <a href=\"https:\/\/en.wikipedia.org\/wiki\/Aho%E2%80%93Corasick_algorithm\" rel=\"noopener noreferrer nofollow\">\u0410\u0445\u043e-\u041a\u043e\u0440\u0430\u0441\u0438\u043a<\/a> \u0442\u0430\u043a \u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445, \u0445\u043e\u0442\u044f \u043e\u0431\u044b\u0447\u043d\u043e \u0434\u0432\u0438\u0436\u043e\u043a \u0440.\u0432. \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043b\u0435\u043d\u0438\u0432\u044b\u0439 \u0414\u041a\u0410, \u0442.\u043a. \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0441\u0445\u043e\u0436\u0430\u044f. \u0410\u0445\u043e-\u041a\u043e\u0440\u0430\u0441\u0438\u043a \u0432\u0441\u0451 \u0435\u0449\u0451 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043c\u043e\u0447\u044c \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u0435\u0444\u0438\u043b\u044c\u0442\u0440\u0430, \u043a\u043e\u0433\u0434\u0430 \u043d\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043b\u0435\u043d\u0438\u0432\u044b\u0439 \u0414\u041a\u0410. \u041d\u0443 \u0438 \u043e\u0431\u044b\u0447\u043d\u043e \u0410\u0445\u043e-\u041a\u043e\u0440\u0430\u0441\u0438\u043a \u043b\u0443\u0447\u0448\u0435 \u043b\u0435\u043d\u0438\u0432\u043e\u0433\u043e \u0414\u041a\u0410, \u043a\u043e\u0433\u0434\u0430 \u0447\u0438\u0441\u043b\u043e \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u043e\u0432 \u044d\u043a\u0441\u0442\u0440\u0435\u043c\u0430\u043b\u044c\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u043e\u0435 (\u043f\u043e\u0440\u044f\u0434\u043a\u0430 \u0434\u0435\u0441\u044f\u0442\u043a\u043e\u0432 \u0442\u044b\u0441\u044f\u0447).<\/p>\n<p>\u0414\u043b\u044f \u0441\u043b\u0443\u0447\u0430\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u043f\u043e\u0434\u0441\u0442\u0440\u043e\u043a \u0435\u0441\u0442\u044c \u0435\u0449\u0451 \u043c\u043d\u043e\u0433\u043e \u0440\u0430\u0431\u043e\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u044f \u043d\u0430\u0434\u0435\u044e\u0441\u044c \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p> <!----> <!----><\/div>\n<p> <!----> <!----><br \/> \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\/749124\/\"> https:\/\/habr.com\/ru\/articles\/749124\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<h2>\u0421\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435<\/h2>\n<ul>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/articles\/748362\/#brief_history\" rel=\"noopener noreferrer nofollow\">\u041a\u0440\u0430\u0442\u043a\u0438\u0439 \u044d\u043a\u0441\u043a\u0443\u0440\u0441<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/articles\/748362\/#problems\" rel=\"noopener noreferrer nofollow\">\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u044b<\/a> <\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/articles\/748362\/#composition\" rel=\"noopener noreferrer nofollow\">\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430: \u0441\u043b\u043e\u0436\u043d\u0430\u044f \u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u044f<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/articles\/748362\/#testing\" rel=\"noopener noreferrer nofollow\">\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430: \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/articles\/748362\/#niche_apis\" rel=\"noopener noreferrer nofollow\">\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430: \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u043d\u0438\u0448\u0435\u0432\u044b\u0435 API<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/articles\/748362\/#compiled_dfas\" rel=\"noopener noreferrer nofollow\">\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430: \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0414\u041a\u0410<\/a><\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/articles\/749124\/#regex_cli\" rel=\"noopener noreferrer nofollow\">\u0421\u043b\u0435\u0434\u0443\u0439 \u0441 regex-cli<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/articles\/749124\/#data_flow\" rel=\"noopener noreferrer nofollow\">\u041f\u043e\u0442\u043e\u043a \u0434\u0430\u043d\u043d\u044b\u0445<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/articles\/749124\/#lit_optimize\" rel=\"noopener noreferrer nofollow\">\u041b\u0438\u0442\u0435\u0440\u0430\u043b\u044c\u043d\u044b\u0435 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438<\/a> <\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/articles\/749124\/#lit_motivation\" rel=\"noopener noreferrer nofollow\">\u041c\u043e\u0442\u0438\u0432\u0430\u0446\u0438\u044f \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u044c\u043d\u044b\u0445 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0439<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/articles\/749124\/#lit_extraction\" rel=\"noopener noreferrer nofollow\">\u0418\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u0435 \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u043e\u0432<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/articles\/749124\/#lit_search\" rel=\"noopener noreferrer nofollow\">\u041f\u043e\u0438\u0441\u043a \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u043e\u0432<\/a><\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<hr\/>\n<h3>\u041f\u043e \u043f\u0443\u0442\u0438 \u0441 regex-cli<\/h3>\n<p><code>regex-cli<\/code> &#8212; \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u043e\u043f\u0440\u043e\u0432\u043e\u0436\u0434\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u0447\u0430\u0441\u0442\u044c \u043a\u0440\u0435\u0439\u0442\u0430 <code>regex<\/code>, \u0438 \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a\u043e \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0443 API \u043a\u0440\u0435\u0439\u0442\u043e\u0432 <code>regex-syntax<\/code>, <code>regex-automata<\/code> \u0438 <code>regex<\/code>. \u0422\u0430\u043a \u0436\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u0443\u0442\u0438\u043b\u0438\u0442\u044b, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0414\u041a\u0410 \u0432 \u0444\u0430\u0439\u043b \u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f Rust-\u043a\u043e\u0434\u0430 \u0434\u043b\u044f \u0438\u0445 \u0447\u0442\u0435\u043d\u0438\u044f.<\/p>\n<p>\u042f \u0431\u0443\u0434\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <code>regex-cli<\/code> \u043d\u0430 \u043f\u0440\u043e\u0442\u044f\u0436\u0435\u043d\u0438\u0438 \u0432\u0441\u0435\u0433\u043e \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u0441\u0442\u0430, \u0442\u0430\u043a \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c, \u043c\u043e\u0436\u0435\u0442\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u044d\u0442\u0443 \u0442\u0443\u043b\u0437\u0443 \u043f\u0440\u044f\u043c\u043e \u0438\u0437 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f \u043a\u0440\u0435\u0439\u0442\u0430 <code>regex<\/code>:<\/p>\n<pre><code>$ cargo install regex-cli <\/code><\/pre>\n<p>\u0412\u043e\u0442 \u043f\u0430\u0440\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442, \u043a\u0430\u043a \u0432\u043b\u0438\u044f\u0435\u0442 \u042e\u043d\u0438\u043a\u043e\u0434 \u043d\u0430 \u0440.\u0432. <code>.<\/code>. \u0421\u043d\u0430\u0447\u0430\u043b\u0430, \u0432\u0435\u0440\u0441\u0438\u044f, \u0433\u0434\u0435 \u0432\u043a\u043b\u044e\u0447\u0435\u043d \u042e\u043d\u0438\u043a\u043e\u0434:<\/p>\n<pre><code>$ regex-cli debug thompson '.' --no-table  thompson::NFA( >000000: binary-union(2, 1)  000001: \\x00-\\xFF => 0 ^000002: capture(pid=0, group=0, slot=0) => 10  000003: \\x80-\\xBF => 11  000004: \\xA0-\\xBF => 3  000005: \\x80-\\xBF => 3  000006: \\x80-\\x9F => 3  000007: \\x90-\\xBF => 5  000008: \\x80-\\xBF => 5  000009: \\x80-\\x8F => 5  000010: sparse(\\x00-\\t => 11, \\x0B-\\x7F => 11, \\xC2-\\xDF => 3, \\xE0 => 4, \\xE1-\\xEC => 5, \\xED => 6, \\xEE-\\xEF => 5, \\xF0 => 7, \\xF1-\\xF3 => 8, \\xF4 => 9)  000011: capture(pid=0, group=0, slot=1) => 12  000012: MATCH(0)  transition equivalence classes: ByteClasses(0 => [\\x00-\\t], 1 => [\\n], 2 => [\\x0B-\\x7F], 3 => [\\x80-\\x8F], 4 => [\\x90-\\x9F], 5 => [\\xA0-\\xBF], 6 => [\\xC0-\\xC1], 7 => [\\xC2-\\xDF], 8 => [\\xE0], 9 => [\\xE1-\\xEC], 10 => [\\xED], 11 => [\\xEE-\\xEF], 12 => [\\xF0], 13 => [\\xF1-\\xF3], 14 => [\\xF4], 15 => [\\xF5-\\xFF], 16 => [EOI]) ) <\/code><\/pre>\n<p>\u0410 \u0432\u043e\u0442 \u0432\u0435\u0440\u0441\u0438\u044f \u0441 \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u043c \u042e\u043d\u0438\u043a\u043e\u0434\u043e\u043c:<\/p>\n<pre><code>$ regex-cli debug thompson '(?-u:.)' --no-table --no-utf8-syntax  thompson::NFA( >000000: binary-union(2, 1)  000001: \\x00-\\xFF => 0 ^000002: capture(pid=0, group=0, slot=0) => 3  000003: sparse(\\x00-\\t => 4, \\x0B-\\xFF => 4)  000004: capture(pid=0, group=0, slot=1) => 5  000005: MATCH(0)  transition equivalence classes: ByteClasses(0 => [\\x00-\\t], 1 => [\\n], 2 => [\\x0B-\\xFF], 3 => [EOI]) ) <\/code><\/pre>\n<p>\u041d\u0430 \u0432\u044b\u0432\u043e\u0434\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043d \u041d\u041a\u0410 \u0422\u043e\u043c\u043f\u0441\u043e\u043d\u0430, \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043a\u0440\u0435\u0439\u0442\u043e\u043c <code>regex-automata<\/code> \u0434\u043b\u044f \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0440.\u0432. \u041a\u043e\u043c\u0430\u043d\u0434\u0430 <code>regex-cli debug<\/code> \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u044c \u043c\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u044d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043a\u0440\u0435\u0439\u0442\u0430 <code>regex<\/code>.<\/p>\n<pre><code> $ regex-cli debug Prints the debug representation of various things from regex-automata and regex-syntax.  This is useful for ad hoc interactions with objects on the command line. In general, most objects support the full suite of configuration available in code via the crate.  USAGE:     regex-cli debug &lt;command> ...  COMMANDS:     ast        Print the debug representation of an AST.     dense      Print the debug representation of a dense DFA.     hir        Print the debug representation of an HIR.     literal    Print the debug representation of extracted literals.     onepass    Print the debug representation of a one-pass DFA.     sparse     Print the debug representation of a sparse DFA.     thompson   Print the debug representation of a Thompson NFA. <\/code><\/pre>\n<p>\u0422\u0430\u043a \u0436\u0435 \u0435\u0441\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0430 <code>regex-cli find<\/code>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c ad hoc \u043f\u043e\u0438\u0441\u043a. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u043e\u0442 \u043a\u0430\u043a \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043c\u0443\u043b\u044c\u0442\u0438-\u0448\u0430\u0431\u043b\u043e\u043d\u043d\u044b\u0439 \u043f\u043e\u0438\u0441\u043a \u0441 \u0433\u0440\u0443\u043f\u043f\u0430\u043c\u0438 \u0437\u0430\u0445\u0432\u0430\u0442\u0430, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0434\u0432\u0438\u0436\u043e\u043a \u0440.\u0432. meta:<\/p>\n<pre><code>$ regex-cli find capture meta \\    -p '(?&lt;email>[.\\w]+@(?&lt;domain>[.\\w]+))' \\    -p '(?&lt;phone>(?&lt;areacode>[0-9]{3})-[0-9]{3}-[0-9]{4})' \\    -y 'foo@example.com, 111-867-5309'      parse time:  20.713\u00b5s  translate time:  22.116\u00b5s build meta time:  834.731\u00b5s     search time:  142.537\u00b5s   total matches:  2 0:{ 0: 0..15\/foo@example.com, 1\/email: 0..15\/foo@example.com, 2\/domain: 4..15\/example.com } 1:{ 0: 17..29\/111-867-5309, 1\/phone: 17..29\/111-867-5309, 2\/areacode: 17..20\/111 } <\/code><\/pre>\n<p>\u0417\u0430\u0433\u043b\u044f\u043d\u0438\u0442\u0435 \u0432 <a href=\"https:\/\/github.com\/rust-lang\/regex\/blob\/4f47b14d60e82e85a880513833362d5fb485ffa8\/regex-cli\/README.md\" rel=\"noopener noreferrer nofollow\"><code>regex-cli README<\/code><\/a> \u0437\u0430 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438.<\/p>\n<h3>\u041f\u043e\u0442\u043e\u043a \u0434\u0430\u043d\u043d\u044b\u0445<\/h3>\n<p>\u041f\u0435\u0440\u0435\u0434 \u0442\u0435\u043c, \u043a\u0430\u043a \u043f\u043e\u0433\u0440\u0443\u0437\u0438\u0442\u044c\u0441\u044f \u0432 \u0434\u0435\u0442\u0430\u043b\u0438, \u0441\u0442\u043e\u0438\u0442 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0430\u0443\u0437\u0443 \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0441 \u0442\u0435\u0440\u043c\u0438\u043d\u043e\u043b\u043e\u0433\u0438\u0435\u0439 \u0438 \u043a\u0440\u0430\u0442\u043a\u043e \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u043f\u043e\u0442\u043e\u043a \u0434\u0430\u043d\u043d\u044b\u0445, \u043f\u0440\u043e\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u0447\u0435\u0440\u0435\u0437 \u0434\u0432\u0438\u0436\u043e\u043a \u0440.\u0432. \u0422.\u0435., \u043a\u043e\u0433\u0434\u0430 \u0432\u044b \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0435 <code>Regex::new<\/code> \u0441 \u043a\u0430\u043a\u0438\u043c-\u0442\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u043c, \u043c\u044b \u043e\u0442\u0441\u043b\u0435\u0434\u0438\u043c \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f, \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u044f\u0449\u0438\u0435 \u0441 \u044d\u0442\u0438\u043c \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u044e\u0442 \u0435\u0433\u043e \u0432 \u043d\u0435\u0447\u0442\u043e, \u0447\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043a\u0430\u0442\u044c \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u044f.<\/p>\n<ul>\n<li>\n<p>\u041f\u0435\u0440\u0432\u044b\u043c \u0434\u0435\u043b\u043e\u043c \u0441\u0442\u0440\u043e\u043a\u0430 \u0441 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u043c \u043f\u0430\u0440\u0441\u0438\u0442\u0441\u044f \u0432 <a href=\"https:\/\/docs.rs\/regex-syntax\/0.7.*\/regex_syntax\/ast\/enum.Ast.html\" rel=\"noopener noreferrer nofollow\"><code>Ast<\/code> (Abstract Syntax Tree)<\/a>. <code>Ast<\/code> &#8212; \u044d\u0442\u043e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u0430.<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u0442\u0435\u043c <code>Ast<\/code> \u0442\u0440\u0430\u043d\u0441\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0432 <a href=\"https:\/\/docs.rs\/regex-syntax\/0.7.*\/regex_syntax\/hir\/struct.Hir.html\" rel=\"noopener noreferrer nofollow\"><code>Hir<\/code> (High-Level Intermediate Representation)<\/a> <code>Hir<\/code> &#8212; \u044d\u0442\u043e \u0434\u0440\u0443\u0433\u043e\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u0430, \u043d\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0435\u0435 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u043c\u0435\u043d\u044c\u0448\u0435 \u0434\u0435\u0442\u0430\u043b\u0435\u0439, \u0447\u0435\u043c <code>Ast<\/code>. \u0412\u0435\u0449\u0438, \u0432\u0440\u043e\u0434\u0435 Unicode case folding \u0438\u043b\u0438 Unicode character class reference \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u044e\u0442\u0441\u044f \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0442\u0440\u0430\u043d\u0441\u043b\u044f\u0446\u0438\u0438.<\/p>\n<\/li>\n<li>\n<p>\u0421\u043b\u0435\u0434\u043e\u043c <code>Hir<\/code> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0434\u0432\u0443\u0445 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439. \u041f\u0435\u0440\u0432\u0430\u044f &#8212; \u044d\u0442\u043e <a href=\"https:\/\/docs.rs\/regex-syntax\/0.7.2\/regex_syntax\/hir\/literal\/struct.Seq.html\" rel=\"noopener noreferrer nofollow\">\u043b\u0438\u0442\u0435\u0440\u0430\u043b\u044c\u043d\u0430\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c (literal sequence)<\/a>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u043e\u0432, \u0438\u0437\u0432\u043b\u0435\u0447\u0451\u043d\u043d\u043e\u0439 \u0438\u0437 \u0448\u0430\u0431\u043b\u043e\u043d\u0430, \u0438 \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u043e\u0438\u0441\u043a\u0430 \u043f\u043e \u0440.\u0432. \u0432 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445. \u041f\u0440\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438, \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u044c\u043d\u0430\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f <a href=\"https:\/\/docs.rs\/regex-automata\/0.3.*\/regex_automata\/util\/prefilter\/struct.Prefilter.html\" rel=\"noopener noreferrer nofollow\">\u043f\u0440\u0435\u0444\u0438\u043b\u044c\u0442\u0440\u0430 (Prefilter)<\/a>. \u0412\u0442\u043e\u0440\u0430\u044f \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044c &#8212; \u044d\u0442\u043e <a href=\"https:\/\/docs.rs\/regex-automata\/0.3.*\/regex_automata\/nfa\/thompson\/struct.NFA.html\" rel=\"noopener noreferrer nofollow\">\u041d\u041a\u0410<\/a><\/p>\n<\/li>\n<li>\n<p>\u0412 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u041d\u041a\u0410 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0434\u0432\u0438\u0436\u043a\u043e\u0432 \u0440.\u0432.:<\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/docs.rs\/regex-automata\/0.3.*\/regex_automata\/nfa\/thompson\/pikevm\/struct.PikeVM.html\" rel=\"noopener noreferrer nofollow\"><code>PikeVM<\/code><\/a> \u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441\u043e \u0432\u0441\u0435\u043c\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u043c\u0438 \u0440.\u0432., \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u043e\u043c. \u0422\u0430\u043a \u0436\u0435 <code>PikeVM<\/code> \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u043e\u0431\u0449\u0430\u0442\u044c \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0441\u043e\u0432\u043f\u0430\u0432\u0448\u0438\u0445 \u0433\u0440\u0443\u043f\u043f \u0437\u0430\u0445\u0432\u0430\u0442\u0430.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/docs.rs\/regex-automata\/0.3.*\/regex_automata\/nfa\/thompson\/backtrack\/struct.BoundedBacktracker.html\" rel=\"noopener noreferrer nofollow\"><code>BoundedBacktracker<\/code><\/a> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0442\u0435\u0445\u043d\u0438\u043a\u0443 \u043e\u0442\u043a\u0430\u0442\u0430, \u043d\u043e \u044f\u0432\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u0435\u0442 \u0441\u0435\u0431\u044f, \u0447\u0442\u043e\u0431\u044b \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u043f\u043e\u0432\u0442\u043e\u0440\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0445\u043e\u0434\u043e\u0432. \u041a\u0430\u043a \u0438 <code>PikeVM<\/code>, \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u043e\u0431\u0449\u0430\u0442\u044c \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u0433\u0440\u0443\u043f\u043f \u0437\u0430\u0445\u0432\u0430\u0442\u0430.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/docs.rs\/regex-automata\/0.3.*\/regex_automata\/dfa\/onepass\/struct.DFA.html\" rel=\"noopener noreferrer nofollow\">\u041e\u0434\u043d\u043e\u043f\u0440\u043e\u0445\u043e\u0434\u043d\u044b\u0439 \u0414\u041a\u0410 (one-pass DFA)<\/a> \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043e\u0447\u0435\u043d\u044c \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u043e\u0435 \u043f\u043e\u0434\u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0440.\u0432., \u043d\u043e \u043c\u043e\u0436\u0435\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u0433\u0440\u0443\u043f\u043f \u0437\u0430\u0445\u0432\u0430\u0442\u0430 \u043e\u0447\u0435\u043d\u044c \u0431\u044b\u0441\u0442\u0440\u043e.<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 <code>[\u043f\u043b\u043e\u0442\u043d\u044b\u0439 \u0414\u041a\u0410 (dense DFA)<\/code>](<a href=\"https:\/\/docs.rs\/regex-automata\/0.3.*\/regex_automata\/dfa\/dense\/struct.DFA.html\" rel=\"noopener noreferrer nofollow\">https:\/\/docs.rs\/regex-automata\/0.3.*\/regex_automata\/dfa\/dense\/struct.DFA.html<\/a>). \u041c\u043e\u0436\u0435\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u0447\u0430\u043b\u043e \u0438 \u043a\u043e\u043d\u0435\u0446 (\u043a\u043e\u0433\u0434\u0430 \u0441\u043a\u043e\u043c\u0431\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u043d \u0441\u043e \u0432\u0442\u043e\u0440\u044b\u043c \u0440\u0430\u0437\u0432\u0451\u0440\u043d\u0443\u0442\u044b\u043c \u0437\u0430\u0434\u043e\u043c \u043d\u0430\u043f\u0435\u0440\u0451\u0434 \u0414\u041a\u0410) \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u044f, \u043d\u043e \u0447\u0440\u0435\u0437\u0432\u044b\u0447\u0430\u0439\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u044b\u0439. \u0413\u043b\u0430\u0432\u043d\u044b\u0439 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u043a &#8212; \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0432 \u0445\u0443\u0434\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0438\u043c\u0435\u0435\u0442 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c <code>O(2^m)<\/code> \u043f\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0438 \u043f\u0430\u043c\u044f\u0442\u0438.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/docs.rs\/regex-automata\/0.3.*\/regex_automata\/hybrid\/dfa\/struct.DFA.html\" rel=\"noopener noreferrer nofollow\">\u041b\u0435\u043d\u0438\u0432\u044b\u0439 \u0414\u041a\u0410 (Lazy DFA)<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u0438\u0440\u0443\u0435\u0442 \u0441\u0435\u0431\u044f \u0438\u0437 <code>\u041d\u041a\u0410<\/code> \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u043f\u043e\u0438\u0441\u043a\u0430. \u0412 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u043e\u043d \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u0435\u0435 <code>PikeVM<\/code>, \u043d\u043e \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u043e\u043d \u0442\u0430\u043a\u043e\u0439 \u0436\u0435 \u0431\u044b\u0441\u0442\u0440\u044b\u0439, \u043a\u0430\u043a <code>\u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0414\u041a\u0410<\/code>, \u043d\u043e \u043a \u0442\u043e\u043c\u0443 \u0436\u0435 \u0431\u0435\u0437 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438 <code>O(2^m)<\/code> \u043f\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438\/\u043f\u0430\u043c\u044f\u0442\u0438 \u043f\u0440\u0438 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438.<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u0412\u0441\u0435 \u0438\u0437 \u0432\u044b\u0448\u0435\u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0445 \u0434\u0432\u0438\u0436\u043a\u043e\u0432 \u0440.\u0432., \u0432\u043a\u043b\u044e\u0447\u0430\u044f <code>Prefilter<\/code>, \u0435\u0441\u043b\u0438 \u043e\u043d \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u0438\u0440\u0443\u0435\u0442\u0441\u044f, \u043c\u043e\u0433\u0443\u0442 \u043a\u043e\u043c\u0431\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u043e\u0434\u0438\u043d\u043e\u0447\u043d\u044b\u0439 <a href=\"https:\/\/docs.rs\/regex-automata\/0.3.*\/regex_automata\/meta\/struct.Regex.html\" rel=\"noopener noreferrer nofollow\"><code>\u043c\u0435\u0442\u0430 \u0434\u0432\u0438\u0436\u043e\u043a \u0440.\u0432.<\/code><\/a>.<\/p>\n<\/li>\n<li>\n<p>\u041a\u0440\u0435\u0439\u0442 <code>regex<\/code> \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0430\u043c \u043f\u043e \u0441\u0435\u0431\u0435 \u043b\u0438\u0448\u044c \u0442\u043e\u043d\u043a\u043e\u0439 \u043e\u0431\u0451\u0440\u0442\u043a\u043e\u0439 \u043d\u0430\u0434 \u043c\u0435\u0442\u0430 \u0434\u0432\u0438\u0436\u043a\u043e\u043c \u0440.\u0432. \u0438\u0437 \u043a\u0440\u0435\u0439\u0442\u0430 <code>regex-automata<\/code>.<\/p>\n<\/li>\n<\/ul>\n<p>\u041c\u044b \u043e\u0431\u0441\u0443\u0434\u0438\u043c \u043a\u0430\u0436\u0434\u0443\u044e \u0438\u0437 \u044d\u0442\u0438\u0445 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439 \u0431\u043e\u043b\u0435\u0435 \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u043e \u043d\u0430 \u043f\u0440\u043e\u0442\u044f\u0436\u0435\u043d\u0438\u0438 \u043f\u043e\u0441\u0442\u0430, \u043d\u043e \u0442\u0440\u0443\u0434\u043d\u043e \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u043e\u0442\u0441\u044b\u043b\u043e\u043a \u043a \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0438\u0437 \u043d\u0438\u0445 \u043d\u0430 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0445 \u044d\u0442\u0430\u043f\u0430\u0445 \u043e\u0431\u044a\u044f\u0441\u043d\u0435\u043d\u0438\u044f, \u0434\u043e \u043f\u043e\u043b\u043d\u043e\u0433\u043e \u0438\u0445 \u0440\u0430\u0441\u043a\u0440\u044b\u0442\u0438\u044f. \u0414\u0430\u043d\u043d\u0430\u044f \u0433\u043b\u0430\u0432\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0434\u0430\u0451\u0442 \u0441\u0430\u043c\u044b\u0439 \u043e\u0431\u0449\u0438\u0439 \u0447\u0435\u0440\u0442\u0451\u0436 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u043e\u0441\u0442\u0435\u0439 \u043a\u0440\u0435\u0439\u0442\u0430 <code>regex<\/code>, \u0438 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0430 \u0437\u0434\u0435\u0441\u044c \u0434\u043b\u044f \u0432\u0432\u0435\u0434\u0435\u043d\u0438\u044f.<\/p>\n<h3>\u041b\u0438\u0442\u0435\u0440\u0430\u043b\u044c\u043d\u044b\u0435 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438<\/h3>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0433\u043b\u0430\u0432\u0435 \u043c\u044b \u043d\u0430\u0447\u043d\u0451\u043c \u043d\u0430\u0448\u0435 \u043f\u0443\u0442\u0435\u0448\u0435\u0441\u0442\u0432\u0438\u0435 \u0432\u043e \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u043a\u0440\u0435\u0439\u0442\u0430 <code>regex<\/code> \u0438 \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043e \u043a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u0430\u0436\u043d\u043e\u0439 \u0442\u0435\u0445\u043d\u0438\u043a\u0435 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0442\u0430\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f: \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u0435 \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u043e\u0432 \u0438\u0437 \u0440.\u0432. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0440.\u0432. <code>(foo|bar|quux)(\\s+\\w+)<\/code> \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u044b\u0439 \u044f\u0437\u044b\u043a, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0432\u0441\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u044f\u0437\u044b\u043a\u0430 \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0442\u0441\u044f \u043b\u0438\u0431\u043e \u0441 <code>foo<\/code>, \u043b\u0438\u0431\u043e \u0441 <code>bar<\/code>, \u043b\u0438\u0431\u043e \u0441 <code>quux<\/code>. \u0412 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u043a\u0430\u0436\u0434\u043e\u0435 \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u0435 \u044d\u0442\u043e\u0433\u043e \u0440.\u0432. \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0441 \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u0437 \u0442\u0440\u0451\u0445 \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u043e\u0432.<\/p>\n<h4>\u041c\u043e\u0442\u0438\u0432\u0430\u0446\u0438\u044f \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u044c\u043d\u044b\u0445 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0439<\/h4>\n<p>\u0422\u0430\u043a \u043f\u043e\u0447\u0435\u043c\u0443 \u0436\u0435 \u044d\u0442\u043e \u0432\u0430\u0436\u043d\u043e? \u041f\u043e\u0447\u0435\u043c\u0443 \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u044b \u043d\u0430\u0441 \u0432\u043e\u043e\u0431\u0449\u0435 \u0437\u0430\u0431\u043e\u0442\u044f\u0442? \u0410 \u044d\u0442\u043e \u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0438\u0437 \u0434\u0432\u0443\u0445 \u043c\u044b\u0441\u043b\u0435\u0439:<\/p>\n<ol>\n<li>\n<p>\u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b \u043f\u043e\u0438\u0441\u043a\u0430 \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u043b\u0438 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0447\u0440\u0435\u0437\u0432\u044b\u0447\u0430\u0439\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u044b. \u0421\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043e\u0431\u044b\u0447\u043d\u043e \u0434\u043e\u0441\u0442\u0438\u0433\u0430\u0435\u0442\u0441\u044f \u0437\u0430 \u0441\u0447\u0451\u0442 \u044d\u043a\u0441\u043f\u043b\u0443\u0430\u0442\u0430\u0446\u0438\u0438 &#171;\u043f\u0440\u043e\u0441\u0442\u043e\u0442\u044b&#187; \u043f\u043e\u0438\u0441\u043a\u0430 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u043e\u0432 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c <a href=\"https:\/\/en.wikipedia.org\/wiki\/Single_instruction,_multiple_data\" rel=\"noopener noreferrer nofollow\">\u0432\u0435\u043a\u0442\u043e\u0440\u043d\u044b\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439<\/a> \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0441\u0440\u0430\u0437\u0443 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u0431\u0430\u0439\u0442 \u0441\u0442\u043e\u0433\u0430 \u0432 \u043e\u0434\u0438\u043d \u0448\u0430\u0433.<\/p>\n<\/li>\n<li>\n<p>\u0412 <em>\u043e\u0447\u0435\u043d\u044c<\/em> \u043e\u0431\u0449\u0438\u0445 \u0447\u0435\u0440\u0442\u0430\u0445, \u043d\u0435\u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b (general algorithms) \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u0439 \u0432 \u0440.\u0432. \u043d\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u044b \u043f\u0440\u043e\u0441\u0442\u044b\u043c\u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u0430\u043c\u0438.<\/p>\n<\/li>\n<\/ol>\n<p>\u041a\u043b\u044e\u0447\u0435\u0432\u043e\u0435 \u0443\u043c\u043e\u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043d\u0435 \u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u0438\u0435 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u0442\u0435\u0445\u043d\u0438\u043a \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0432\u0438\u0436\u043a\u0430 \u0440.\u0432. (\u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043a\u043e\u0441\u043d\u0451\u043c\u0441\u044f \u0431\u043e\u043b\u0435\u0435 \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u0435\u0435 \u043f\u043e\u0437\u0436\u0435), \u043d\u0438 \u043e\u0434\u043d\u0430 \u0438\u0437 \u043d\u0438\u0445 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0442\u0430\u043a\u043e\u0439 \u0436\u0435 \u0431\u044b\u0441\u0442\u0440\u043e\u0439, \u043a\u0430\u043a \u0445\u043e\u0440\u043e\u0448\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u043f\u043e\u0434\u0441\u0442\u0440\u043e\u043a\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0432\u0435\u043a\u0442\u043e\u0440\u043d\u044b\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439. \u041d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 \u044f \u0447\u0430\u0441\u0442\u043e \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0432\u0430\u043b \u0440\u0430\u0437\u043d\u0438\u0446\u0443 \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u043d\u0430 \u043e\u0434\u0438\u043d \u043f\u043e\u0440\u044f\u0434\u043e\u043a, \u0430 \u0438\u043d\u043e\u0433\u0434\u0430 \u0438 \u0431\u043e\u043b\u044c\u0448\u0435.<\/p>\n<h4>\u0418\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u0435 \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u043e\u0432<\/h4>\n<p>\u041f\u0440\u0438\u0432\u0435\u0434\u0443 \u043a\u043e\u0435-\u043a\u0430\u043a\u0438\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <code>regex-cli<\/code> \u0438 \u043f\u043e\u0434\u043a\u043e\u043c\u0430\u043d\u0434\u0443 <code>regex-cli debug literal<\/code> \u0434\u043b\u044f \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u044f \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u043e\u0432 \u0438\u0437 \u0440.\u0432. \u041d\u0430\u0447\u043d\u0451\u043c \u0441 \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e:<\/p>\n<pre><code>$ regex-cli debug literal 'bar'            parse time:  13.967\u00b5s        translate time:  7.008\u00b5s       extraction time:  405ns     optimization time:  1.479\u00b5s                   len:  Some(1)            is finite?:  true             is exact?:  true       min literal len:  Some(3)       max literal len:  Some(3) longest common prefix:  Some(\"bar\") longest common suffix:  Some(\"bar\")  E(\"bar\") <\/code><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435, \u044f \u0431\u0443\u0434\u0443 \u043e\u0431\u0440\u0435\u0437\u0430\u0442\u044c \u0432\u044b\u0432\u043e\u0434 \u043a\u043e\u043c\u0430\u043d\u0434\u044b, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043e\u043d\u0430 \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u0443\u0436 \u043e\u0447\u0435\u043d\u044c \u043c\u043d\u043e\u0433\u043e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438. \u041d\u0443 \u0442\u0435\u043f\u0435\u0440\u044c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f:<\/p>\n<ul>\n<li>\n<p>\u0412\u0440\u0435\u043c\u044f \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0430 (<code>parse time<\/code>) \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u0430 <code>bar<\/code> \u0432 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <a href=\"https:\/\/docs.rs\/regex-syntax\/0.7.*\/regex_syntax\/ast\/enum.Ast.html\" rel=\"noopener noreferrer nofollow\"><code>Ast<\/code><\/a>.<\/p>\n<\/li>\n<li>\n<p>\u0412\u0440\u0435\u043c\u044f \u0442\u0440\u0430\u043d\u0441\u043b\u044f\u0446\u0438\u0438 (<code>translate time<\/code>) \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f <code>Ast<\/code> \u0432 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <a href=\"https:\/\/docs.rs\/regex-syntax\/0.7.*\/regex_syntax\/hir\/struct.Hir.html\" rel=\"noopener noreferrer nofollow\"><code>Hir<\/code><\/a>.<\/p>\n<\/li>\n<li>\n<p>\u0412\u0440\u0435\u043c\u044f \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u044f (<code>extraction time<\/code>) \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0431\u044b\u043b\u043e \u0437\u0430\u0442\u0440\u0430\u0447\u0435\u043d\u043e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f <code>Hir<\/code> \u0432 <a href=\"https:\/\/docs.rs\/regex-syntax\/0.7.2\/regex_syntax\/hir\/literal\/struct.Seq.html\" rel=\"noopener noreferrer nofollow\">\u043b\u0438\u0442\u0435\u0440\u0430\u043b\u044c\u043d\u0443\u044e \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c<\/a>.<\/p>\n<\/li>\n<li>\n<p>\u0412\u0440\u0435\u043c\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 (<code>optimization time<\/code>) \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 &#171;\u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f&#187; \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u044c\u043d\u043e\u0439 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438. \u042d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043a\u0430\u043a \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435\u043c \u0434\u0443\u0431\u043b\u0438\u043a\u0430\u0442\u043e\u0432 \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u043e\u0432, \u0442\u0430\u043a \u0438 \u0442\u0430\u043a\u0438\u043c \u0430\u0433\u0440\u0435\u0441\u0441\u0438\u0432\u043d\u044b\u043c, \u043a\u0430\u043a \u0441\u043e\u043a\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c\u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u0430\u043c\u0438, \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u043c\u0438 \u043d\u0430 \u044d\u0432\u0440\u0438\u0441\u0442\u0438\u043a\u0430\u0445. \u041c\u044b \u0443\u0432\u0438\u0434\u0438\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u0437\u0436\u0435.<\/p>\n<\/li>\n<li>\n<p><code>len<\/code> &#8212; \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u043e\u0432 \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u044b\u043b\u0430 \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0430.<\/p>\n<\/li>\n<li>\n<p>\u0424\u043b\u0430\u0433 <code>is finite<\/code> \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0438\u043c\u0435\u0435\u0442 \u043b\u0438 \u0438\u0437\u0432\u043b\u0435\u0447\u0451\u043d\u043d\u0430\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432. \u0411\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u0430\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0432\u0441\u0435\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u043e\u0432, \u0438 \u044d\u0442\u043e \u043e\u0431\u044b\u0447\u043d\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u044c\u043d\u044b\u0435 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b \u043b\u0438\u0431\u043e \u043d\u0435 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0446\u0435\u043b\u0435\u0441\u043e\u043e\u0431\u0440\u0430\u0437\u043d\u044b\u043c\u0438.<\/p>\n<\/li>\n<li>\n<p>\u0424\u043b\u0430\u0433 <code>is exact<\/code> \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043b\u0438 \u043a\u0430\u0436\u0434\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0432<\/p>\n<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-350521","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/350521","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=350521"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/350521\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=350521"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=350521"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=350521"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}