{"id":375660,"date":"2024-05-21T06:30:04","date_gmt":"2024-05-21T06:30:04","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=375660"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=375660","title":{"rendered":"<span>regexp \u2014 \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u0433\u043e\u043d\u043a\u0438<\/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<blockquote>\n<p>&#171;\u0415\u0441\u043b\u0438 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u044b \u0441\u0442\u0430\u043d\u0443\u0442 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u043e\u0449\u043d\u044b\u043c\u0438, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u0432 \u043a\u043e\u043c\u0438\u0442\u0435\u0442\u044b.\u00a0\u042d\u0442\u043e \u0438\u0445 \u043f\u0440\u0438\u043a\u043e\u043d\u0447\u0438\u0442&#187; (\u0441) \u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0439 \u0430\u0432\u0442\u043e\u0440<\/p>\n<\/blockquote>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/65f\/855\/d9c\/65f855d9c72982ec6d278e0fd7f466dd.jpg\" alt=\"\u0411\u043e\u043b\u044c\u0448\u0438\u0435 \u0433\u043e\u043d\u043a\u0438 regexp\" title=\"\u0411\u043e\u043b\u044c\u0448\u0438\u0435 \u0433\u043e\u043d\u043a\u0438 regexp\" width=\"1280\" height=\"720\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/65f\/855\/d9c\/65f855d9c72982ec6d278e0fd7f466dd.jpg\" data-blurred=\"true\"\/><\/p>\n<div><figcaption>\u0411\u043e\u043b\u044c\u0448\u0438\u0435 \u0433\u043e\u043d\u043a\u0438 regexp<\/figcaption><\/div>\n<\/figure>\n<h2>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h2>\n<p>\u0422\u0430\u043a \u0438\u043b\u0438 \u0438\u043d\u0430\u0447\u0435 \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0441 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u044b\u043c\u0438 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f\u043c\u0438 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u043b\u043e\u0441\u044c \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0443 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432. \u041c\u043e\u0435 \u043f\u0435\u0440\u0432\u043e\u0435 \u0437\u043d\u0430\u043a\u043e\u043c\u0441\u0442\u0432\u043e \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u043e \u0441 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0435\u0439 regexp \u0432 STL <code>std::regexp<\/code>. \u0427\u0430\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043a\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0432 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0435 \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445, \u0447\u0442\u043e-\u0442\u043e \u0432\u0440\u043e\u0434\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0441\u0442\u0438 \u0432\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c URL, \u0430\u0434\u0440\u0435\u0441\u0430 IPv4, \u0430\u0434\u0440\u0435\u0441\u0430 IPv6, \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u043d\u043e\u0433\u043e \u043d\u043e\u043c\u0435\u0440\u0430 \u0438 \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 regex \u043d\u0435 \u0441\u0438\u043b\u044c\u043d\u043e \u0432\u043b\u0438\u044f\u0435\u0442 \u043d\u0430 \u0432\u0440\u0435\u043c\u044f \u043e\u0442\u043a\u043b\u0438\u043a\u0430 \u043e\u0442 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u041d\u043e, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u0432\u0430\u043c \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u0441\u043e\u0442\u043d\u0438, \u0442\u044b\u0441\u044f\u0447\u0438 \u0438\u043b\u0438 \u0434\u0430\u0436\u0435 \u0434\u0435\u0441\u044f\u0442\u043a\u0438 \u0442\u044b\u0441\u044f\u0447 \u043f\u0440\u0430\u0432\u0438\u043b \u0438 \u0432\u0441\u0435 \u044d\u0442\u043e \u043d\u0430 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u043c\u0435\u043d\u044f\u044e\u0449\u0438\u0445\u0441\u044f \u043d\u0430\u0431\u043e\u0440\u0430\u0445 \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438? \u0412 \u044d\u0442\u043e\u0439 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438 \u0432\u0430\u043c \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0443\u0436\u0435\u043d \u0431\u044b\u0441\u0442\u0440\u044b\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c, \u0432\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u043b\u0443\u0447\u0448\u0438\u0439 \u0438\u0437 \u043d\u0438\u0445, \u0432\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0447\u0435\u043c\u043f\u0438\u043e\u043d!<\/p>\n<h2>\u0412\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u043e\u0432 \u0441\u043e\u0440\u0435\u0432\u043d\u043e\u0432\u0430\u043d\u0438\u0439<\/h2>\n<p>\u041a\u0440\u0438\u0442\u0435\u0440\u0438\u0438 \u043e\u0442\u0431\u043e\u0440\u0430 \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u043e\u0432 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u044b:<\/p>\n<ul>\n<li>\n<p>\u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0445 \u043a\u043e\u0434\u043e\u0432<\/p>\n<\/li>\n<li>\n<p>\u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u044c \u043f\u043e \u0441\u0430\u043c\u0438\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c, \u0445\u043e\u0442\u044f \u0431\u044b \u043d\u0430 \u0431\u0430\u0437\u043e\u0432\u043e\u043c \u0443\u0440\u043e\u0432\u043d\u0435<\/p>\n<\/li>\n<li>\n<p>\u043a\u043e\u0434 \u043d\u0430\u043f\u0438\u0441\u0430\u043d \u043d\u0430 \u0421\/\u0421++ <\/p>\n<\/li>\n<\/ul>\n<details class=\"spoiler\">\n<summary>Hidden text<\/summary>\n<div class=\"spoiler__content\">\n<p>\u0414\u0430, \u044f \u0444\u0430\u043d\u0430\u0442 \u0421++, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 regexp \u043d\u0430 \u044f\u0437\u044b\u043a\u0430\u0445 \u043e\u0442\u043b\u0438\u0447\u043d\u044b\u0445 \u043e\u0442 C\/C++ \u043d\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u044e, \u0441\u043e\u0440\u044f\u043d<\/p>\n<\/div>\n<\/details>\n<p>\u0418\u0442\u0430\u043a, <s>\u043f\u043e\u0433\u0443\u0433\u043b\u0438\u0432<\/s> \u043f\u043e\u044f\u043d\u0434\u0435\u043a\u0441\u0438\u0432 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u043f\u0440\u0435\u0442\u0435\u043d\u0434\u0435\u043d\u0442\u043e\u0432:<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td data-colwidth=\"162\" width=\"162\">\n<p align=\"center\">\u041f\u0440\u0438\u0441\u0432\u043e\u0435\u043d\u043d\u043e\u0435 \u0438\u043c\u044f<\/p>\n<\/td>\n<td data-colwidth=\"134\" width=\"134\">\n<p align=\"center\">\u042f\u0437\u044b\u043a<\/p>\n<\/td>\n<td>\n<p align=\"center\">\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"162\" width=\"162\">\n<p align=\"left\">stdlib<\/p>\n<\/td>\n<td data-colwidth=\"134\" width=\"134\">\n<p align=\"center\">C++<\/p>\n<\/td>\n<td>\n<p align=\"left\">&#8212;<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"162\" width=\"162\">\n<p align=\"left\">tiny-regex-c<\/p>\n<\/td>\n<td data-colwidth=\"134\" width=\"134\">\n<p align=\"center\">C<\/p>\n<\/td>\n<td>\n<p align=\"left\"><a href=\"https:\/\/github.com\/kokke\/tiny-regex-c\" rel=\"noopener noreferrer nofollow\"><u>https:\/\/github.com\/kokke\/tiny-regex-c<\/u><\/a><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"162\" width=\"162\">\n<p align=\"left\">ximtech<\/p>\n<\/td>\n<td data-colwidth=\"134\" width=\"134\">\n<p align=\"center\">C<\/p>\n<\/td>\n<td>\n<p align=\"left\"><a href=\"https:\/\/github.com\/ximtech\/Regex\" rel=\"noopener noreferrer nofollow\"><u>https:\/\/github.com\/ximtech\/Regex<\/u><\/a><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"162\" width=\"162\">\n<p align=\"left\">boost<\/p>\n<\/td>\n<td data-colwidth=\"134\" width=\"134\">\n<p align=\"center\">C++<\/p>\n<\/td>\n<td>\n<p align=\"left\"><a href=\"https:\/\/github.com\/boostorg\/regex.git\" rel=\"noopener noreferrer nofollow\"><u>https:\/\/github.com\/boostorg\/regex.git<\/u><\/a><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"162\" width=\"162\">\n<p align=\"left\">hyperscan<\/p>\n<\/td>\n<td data-colwidth=\"134\" width=\"134\">\n<p align=\"center\">\u0421<\/p>\n<\/td>\n<td>\n<p align=\"left\"><a href=\"https:\/\/github.com\/intel\/hyperscan\" rel=\"noopener noreferrer nofollow\"><u>https:\/\/github.com\/intel\/hyperscan<\/u><\/a><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"162\" width=\"162\">\n<p align=\"left\">google-re2<\/p>\n<\/td>\n<td data-colwidth=\"134\" width=\"134\">\n<p align=\"center\">C++<\/p>\n<\/td>\n<td>\n<p align=\"left\"><a href=\"https:\/\/github.com\/google\/re2\" rel=\"noopener noreferrer nofollow\"><u>https:\/\/github.com\/google\/re2<\/u><\/a><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<h2>\u041c\u0435\u0442\u043e\u0434\u043e\u043b\u043e\u0433\u0438\u044f<\/h2>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0443\u0436\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u043a\u0430\u043a \u0431\u0443\u0434\u0435\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u043e\u0432.<\/p>\n<ol>\n<li>\n<p>\u0415\u0441\u0442\u044c \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0439 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u0442\u044c \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u043d\u0430\u0431\u043e\u0440\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0439 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p>\u0414\u043b\u044f \u0432\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043d\u0438\u044f \u0437\u0430\u043c\u0435\u0440\u043e\u0432 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0431\u0443\u0434\u0435\u043c \u0438\u0442\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u043a\u0430\u0436\u0434\u043e\u0435 (\u0438\u0437 <code>NR<\/code>) \u043f\u0440\u0430\u0432\u0438\u043b\u043e <code>IR<\/code> \u0440\u0430\u0437 \u043d\u0430 <code>ID<\/code> \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u044f\u0445 \u043d\u0430\u0431\u043e\u0440\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445 (\u0438\u0437 <code>ND<\/code>), \u0442.\u0435. \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u0430 \u0431\u0443\u0434\u0435\u0442: <code>SUM = IR * NR * ID * ND<\/code><\/p>\n<\/li>\n<li>\n<p>\u0414\u043b\u044f \u0441\u043d\u0438\u0436\u0435\u043d\u0438\u044f \u0432\u0437\u0430\u0438\u043c\u043d\u043e\u0433\u043e \u0432\u043b\u0438\u044f\u043d\u0438\u044f \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u043e\u0432 \u0434\u0440\u0443\u0433 \u043d\u0430 \u0434\u0440\u0443\u0433\u0430 \u0431\u0443\u0434\u0435\u043c \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u0430.<\/p>\n<\/li>\n<li>\n<p>\u0414\u043b\u044f \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u0430 \u043a\u043b\u043e\u043d\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0438\u0437 \u0435\u0433\u043e \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f, \u0438\u0437 \u0432\u0435\u0442\u043a\u0438 master \u0438\u043b\u0438 \u0442\u043e\u043b\u0435\u0440\u0430\u043d\u0442\u043d\u043e\u0433\u043e main.<\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a &#8212; \u044d\u0442\u043e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430, \u0442\u043e \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0435\u0433\u043e \u0441\u0431\u043e\u0440\u043a\u0430.<\/p>\n<\/li>\n<li>\n<p>\u041d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043a\u043e\u0434 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u043a\u043b\u0430\u0441\u0441\u0430 c \u0434\u0432\u0443\u043c\u044f \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u044b\u043c\u0438 \u043c\u0435\u0442\u043e\u0434\u0430\u043c\u0438 &#8212; \u043e\u0434\u0438\u043d \u0434\u043b\u044f \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0438 \u043f\u0440\u0430\u0432\u0438\u043b (\u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0438 \u0434\u043b\u044f \u0438\u0445 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438) \u0438 \u043e\u0434\u0438\u043d \u0434\u043b\u044f \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0430\u0432\u0438\u043b \u043d\u0430 \u043d\u0430\u0431\u043e\u0440\u0435 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0433\u043e\u043d\u043a\u0438 \u0431\u0443\u0434\u0435\u043c \u043d\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435 \u0432 \u043e\u0431\u043b\u0430\u043a\u0435<\/p>\n<\/li>\n<\/ol>\n<h2>\u0411\u043e\u043b\u044c\u0448\u0430\u044f \u0433\u043e\u043d\u043a\u0430<\/h2>\n<p>\u041a\u043e\u0434 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 <a href=\"https:\/\/github.com\/shvit\/regexp_checker\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/shvit\/regexp_checker<\/a><\/p>\n<p>\u0414\u043b\u044f \u0436\u0435\u043b\u0430\u044e\u0449\u0438\u0445 \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u0433\u043e\u043d\u043a\u0443 \u043d\u0430 \u0441\u0432\u043e\u0435\u043c \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0435, \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438. \u0414\u043b\u044f Ubuntu 20.04 (\u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0442\u0430\u043a\u0436\u0435 \u0438 \u0434\u043b\u044f <code>ubuntu-latest<\/code>):<\/p>\n<p><code>sudo apt install build-essential cmake ragel git libboost-all-dev<\/code><\/p>\n<p><code>git clone https:\/\/github.com\/abseil\/abseil-cpp abseil-cpp &amp;&amp; cd abseil-cpp &amp;&amp; mkdir -p bin &amp;&amp; cd bin &amp;&amp; cmake -DCMAKE_CXX_STANDARD=17 -DCMAKE_POSITION_INDEPENDENT_CODE=ON .. &amp;&amp; cmake --build . &amp;&amp; sudo cmake --install .<\/code> <\/p>\n<p>\u0442\u0435\u043f\u0435\u0440\u044c \u043a\u043b\u043e\u043d\u0438\u0440\u0443\u0435\u043c \u0433\u043e\u043d\u043a\u0443 \u0441\u0435\u0431\u0435 \u043d\u0430 \u043a\u043e\u043c\u043f \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c<\/p>\n<p><code>git clone https:\/\/github.com\/shvit\/regexp_checker<br \/>cd regexp_checker<br \/>make check<\/code><\/p>\n<p>\u041f\u0440\u043e\u0449\u0435, \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0436\u0435, \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0433\u043e\u0442\u043e\u0432\u044b\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043d\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u043a\u0435 \u0432 GitHub Actions:<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td data-colwidth=\"230\" width=\"230\">\n<p align=\"center\">\u0423\u0447\u0430\u0441\u0442\u043d\u0438\u043a<\/p>\n<\/td>\n<td data-colwidth=\"249\" width=\"249\">\n<p align=\"center\">\u0412\u0440\u0435\u043c\u044f<\/p>\n<\/td>\n<td>\n<p align=\"center\">\u041c\u0435\u0441\u0442\u043e<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"230\" width=\"230\">\n<p align=\"left\"><a href=\"https:\/\/github.com\/boostorg\/regex.git\" rel=\"noopener noreferrer nofollow\">boost<\/a><\/p>\n<\/td>\n<td data-colwidth=\"249\" width=\"249\">\n<p align=\"left\"><a href=\"https:\/\/github.com\/shvit\/regexp_checker\/actions\/runs\/8971493308\/job\/24637348211#step:6:47\" rel=\"noopener noreferrer nofollow\">4.914s<\/a><\/p>\n<\/td>\n<td>\n<p align=\"center\">2<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"230\" width=\"230\">\n<p align=\"left\"><a href=\"https:\/\/github.com\/google\/re2\" rel=\"noopener noreferrer nofollow\">google-re2<\/a><\/p>\n<\/td>\n<td data-colwidth=\"249\" width=\"249\">\n<p align=\"left\"><a href=\"https:\/\/github.com\/shvit\/regexp_checker\/actions\/runs\/8971493308\/job\/24637348211#step:6:48\" rel=\"noopener noreferrer nofollow\">16.012s<\/a><\/p>\n<\/td>\n<td>\n<p align=\"center\">3<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"230\" width=\"230\">\n<p align=\"left\"><a href=\"https:\/\/github.com\/intel\/hyperscan\" rel=\"noopener noreferrer nofollow\">hyperscan<\/a><\/p>\n<\/td>\n<td data-colwidth=\"249\" width=\"249\">\n<p align=\"left\"><a href=\"https:\/\/github.com\/shvit\/regexp_checker\/actions\/runs\/8971493308\/job\/24637348211#step:6:49\" rel=\"noopener noreferrer nofollow\">0.826s<\/a><\/p>\n<\/td>\n<td>\n<p align=\"center\">1<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"230\" width=\"230\">\n<p align=\"left\">stdlib<\/p>\n<\/td>\n<td data-colwidth=\"249\" width=\"249\">\n<p align=\"left\"><a href=\"https:\/\/github.com\/shvit\/regexp_checker\/actions\/runs\/8971493308\/job\/24637348211#step:6:50\" rel=\"noopener noreferrer nofollow\">65.517s<\/a><\/p>\n<\/td>\n<td>\n<p align=\"center\">6<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"230\" width=\"230\">\n<p align=\"left\"><a href=\"https:\/\/github.com\/kokke\/tiny-regex-c\" rel=\"noopener noreferrer nofollow\">tiny-regex-c<\/a><\/p>\n<\/td>\n<td data-colwidth=\"249\" width=\"249\">\n<p align=\"left\"><a href=\"https:\/\/github.com\/shvit\/regexp_checker\/actions\/runs\/8971493308\/job\/24637348211#step:6:51\" rel=\"noopener noreferrer nofollow\">23.288s<\/a><\/p>\n<\/td>\n<td>\n<p align=\"center\">4<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"230\" width=\"230\">\n<p align=\"left\"><a href=\"https:\/\/github.com\/ximtech\/Regex\" rel=\"noopener noreferrer nofollow\">ximtech<\/a><\/p>\n<\/td>\n<td data-colwidth=\"249\" width=\"249\">\n<p align=\"left\"><a href=\"https:\/\/github.com\/shvit\/regexp_checker\/actions\/runs\/8971493308\/job\/24637348211#step:6:52\" rel=\"noopener noreferrer nofollow\">51.421s<\/a><\/p>\n<\/td>\n<td>\n<p align=\"center\">5<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438, \u0432\u043c\u0435\u0441\u0442\u043e \u044e\u043d\u0438\u0442 \u0442\u0435\u0441\u0442\u043e\u0432 &#8212; \u0432\u0441\u0435 \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u0438 \u0432\u044b\u0434\u0430\u043b\u0438 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u0439 &#8212; \u043f\u043e <code>2'800'000<\/code>.<\/p>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u043b\u0438\u0441\u044c \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438: <code>NR=10, IR=20'000, ND=5, ID=10<\/code>. \u041e\u0431\u0449\u0435\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u0430 <code>SUM=10'000'000<\/code>.<\/p>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>\u041f\u0440\u0438 \u0442\u0435\u043a\u0443\u0449\u0435\u043c \u0441\u043e\u0441\u0442\u0430\u0432\u0435 \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u043e\u0432 \u0431\u0435\u0441\u0441\u043f\u043e\u0440\u043d\u044b\u043c \u0447\u0435\u043c\u043f\u0438\u043e\u043d\u043e\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0435\u043a\u0442 <code>hyperscan<\/code>, \u043d\u043e \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0440\u0430\u0434\u043e\u0432\u0430\u043b \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a \u0437\u0430\u043d\u044f\u0432\u0448\u0438\u0439 \u0432\u0442\u043e\u0440\u043e\u0435 \u043c\u0435\u0441\u0442\u043e &#8212; <code>boost<\/code>.<\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u044b <code>tiny-regex-c<\/code> \u0438 <code>ximtech<\/code> \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442 \u0441\u043e\u043a\u0440\u0430\u0449\u0435\u043d\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 regexp, \u0438\u0437-\u0437\u0430 \u0447\u0435\u0433\u043e \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u0440\u0430\u0432\u0438\u043b. \u041f\u0440\u043e\u0435\u043a\u0442 <code>ximtech<\/code> \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0430 <code>tiny-regex-c<\/code>. \u0422\u0430\u043a\u0436\u0435 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 <code>tiny-regex-c<\/code> \u0435\u0441\u0442\u044c \u0431\u0430\u0433\u0438 \u0438 \u0442\u0430\u043a\u0436\u0435 \u043e\u043d \u043d\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u043e\u0434\u043d\u043e\u0433\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0438\u0437-\u0437\u0430 \u0441\u0432\u043e\u0435\u0439 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b.<\/p>\n<p>\u0414\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430 <code>google-re2<\/code> \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a <code>Abseil<\/code> \u0438 \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043d\u0435 \u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u043b\u0438\u043d\u043a\u043e\u0432\u043a\u0430 \u0433\u043e\u0442\u043e\u0432\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/p>\n<p>\u0412 \u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435, \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0443 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 <code>hyperscan<\/code> \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043f\u0440\u0430\u0432\u0438\u043b \u043d\u0430 \u043f\u043e\u0442\u043e\u043a\u0430\u0445 (streams), \u0447\u0442\u043e \u0432 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0440\u0435\u0448\u0430\u044e\u0449\u0438\u043c.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u043a\u0442\u043e-\u0442\u043e \u0437\u043d\u0430\u0435\u0442 \u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u043e\u0432 \u0433\u043e\u043d\u043a\u0438 &#8212; \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0439\u0442\u0435 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445.<\/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\/812953\/\"> https:\/\/habr.com\/ru\/articles\/812953\/<\/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<blockquote>\n<p>&#171;\u0415\u0441\u043b\u0438 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u044b \u0441\u0442\u0430\u043d\u0443\u0442 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u043e\u0449\u043d\u044b\u043c\u0438, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u0432 \u043a\u043e\u043c\u0438\u0442\u0435\u0442\u044b.\u00a0\u042d\u0442\u043e \u0438\u0445 \u043f\u0440\u0438\u043a\u043e\u043d\u0447\u0438\u0442&#187; (\u0441) \u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0439 \u0430\u0432\u0442\u043e\u0440<\/p>\n<\/blockquote>\n<figure class=\"full-width\">\n<div><figcaption>\u0411\u043e\u043b\u044c\u0448\u0438\u0435 \u0433\u043e\u043d\u043a\u0438 regexp<\/figcaption><\/div>\n<\/figure>\n<h2>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h2>\n<p>\u0422\u0430\u043a \u0438\u043b\u0438 \u0438\u043d\u0430\u0447\u0435 \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0441 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u044b\u043c\u0438 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f\u043c\u0438 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u043b\u043e\u0441\u044c \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0443 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432. \u041c\u043e\u0435 \u043f\u0435\u0440\u0432\u043e\u0435 \u0437\u043d\u0430\u043a\u043e\u043c\u0441\u0442\u0432\u043e \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u043e \u0441 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0435\u0439 regexp \u0432 STL <code>std::regexp<\/code>. \u0427\u0430\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043a\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0432 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0435 \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445, \u0447\u0442\u043e-\u0442\u043e \u0432\u0440\u043e\u0434\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0441\u0442\u0438 \u0432\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c URL, \u0430\u0434\u0440\u0435\u0441\u0430 IPv4, \u0430\u0434\u0440\u0435\u0441\u0430 IPv6, \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u043d\u043e\u0433\u043e \u043d\u043e\u043c\u0435\u0440\u0430 \u0438 \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 regex \u043d\u0435 \u0441\u0438\u043b\u044c\u043d\u043e \u0432\u043b\u0438\u044f\u0435\u0442 \u043d\u0430 \u0432\u0440\u0435\u043c\u044f \u043e\u0442\u043a\u043b\u0438\u043a\u0430 \u043e\u0442 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u041d\u043e, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u0432\u0430\u043c \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u0441\u043e\u0442\u043d\u0438, \u0442\u044b\u0441\u044f\u0447\u0438 \u0438\u043b\u0438 \u0434\u0430\u0436\u0435 \u0434\u0435\u0441\u044f\u0442\u043a\u0438 \u0442\u044b\u0441\u044f\u0447 \u043f\u0440\u0430\u0432\u0438\u043b \u0438 \u0432\u0441\u0435 \u044d\u0442\u043e \u043d\u0430 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u043c\u0435\u043d\u044f\u044e\u0449\u0438\u0445\u0441\u044f \u043d\u0430\u0431\u043e\u0440\u0430\u0445 \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438? \u0412 \u044d\u0442\u043e\u0439 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438 \u0432\u0430\u043c \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0443\u0436\u0435\u043d \u0431\u044b\u0441\u0442\u0440\u044b\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c, \u0432\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u043b\u0443\u0447\u0448\u0438\u0439 \u0438\u0437 \u043d\u0438\u0445, \u0432\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0447\u0435\u043c\u043f\u0438\u043e\u043d!<\/p>\n<h2>\u0412\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u043e\u0432 \u0441\u043e\u0440\u0435\u0432\u043d\u043e\u0432\u0430\u043d\u0438\u0439<\/h2>\n<p>\u041a\u0440\u0438\u0442\u0435\u0440\u0438\u0438 \u043e\u0442\u0431\u043e\u0440\u0430 \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u043e\u0432 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u044b:<\/p>\n<ul>\n<li>\n<p>\u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0445 \u043a\u043e\u0434\u043e\u0432<\/p>\n<\/li>\n<li>\n<p>\u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u044c \u043f\u043e \u0441\u0430\u043c\u0438\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c, \u0445\u043e\u0442\u044f \u0431\u044b \u043d\u0430 \u0431\u0430\u0437\u043e\u0432\u043e\u043c \u0443\u0440\u043e\u0432\u043d\u0435<\/p>\n<\/li>\n<li>\n<p>\u043a\u043e\u0434 \u043d\u0430\u043f\u0438\u0441\u0430\u043d \u043d\u0430 \u0421\/\u0421++ <\/p>\n<\/li>\n<\/ul>\n<details class=\"spoiler\">\n<summary>Hidden text<\/summary>\n<div class=\"spoiler__content\">\n<p>\u0414\u0430, \u044f \u0444\u0430\u043d\u0430\u0442 \u0421++, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 regexp \u043d\u0430 \u044f\u0437\u044b\u043a\u0430\u0445 \u043e\u0442\u043b\u0438\u0447\u043d\u044b\u0445 \u043e\u0442 C\/C++ \u043d\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u044e, \u0441\u043e\u0440\u044f\u043d<\/p>\n<\/div>\n<\/details>\n<p>\u0418\u0442\u0430\u043a, <s>\u043f\u043e\u0433\u0443\u0433\u043b\u0438\u0432<\/s> \u043f\u043e\u044f\u043d\u0434\u0435\u043a\u0441\u0438\u0432 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u043f\u0440\u0435\u0442\u0435\u043d\u0434\u0435\u043d\u0442\u043e\u0432:<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td data-colwidth=\"162\" width=\"162\">\n<p align=\"center\">\u041f\u0440\u0438\u0441\u0432\u043e\u0435\u043d\u043d\u043e\u0435 \u0438\u043c\u044f<\/p>\n<\/td>\n<td data-colwidth=\"134\" width=\"134\">\n<p align=\"center\">\u042f\u0437\u044b\u043a<\/p>\n<\/td>\n<td>\n<p align=\"center\">\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"162\" width=\"162\">\n<p align=\"left\">stdlib<\/p>\n<\/td>\n<td data-colwidth=\"134\" width=\"134\">\n<p align=\"center\">C++<\/p>\n<\/td>\n<td>\n<p align=\"left\">&#8212;<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"162\" width=\"162\">\n<p align=\"left\">tiny-regex-c<\/p>\n<\/td>\n<td data-colwidth=\"134\" width=\"134\">\n<p align=\"center\">C<\/p>\n<\/td>\n<td>\n<p align=\"left\"><a href=\"https:\/\/github.com\/kokke\/tiny-regex-c\" rel=\"noopener noreferrer nofollow\"><u>https:\/\/github.com\/kokke\/tiny-regex-c<\/u><\/a><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"162\" width=\"162\">\n<p align=\"left\">ximtech<\/p>\n<\/td>\n<td data-colwidth=\"134\" width=\"134\">\n<p align=\"center\">C<\/p>\n<\/td>\n<td>\n<p align=\"left\"><a href=\"https:\/\/github.com\/ximtech\/Regex\" rel=\"noopener noreferrer nofollow\"><u>https:\/\/github.com\/ximtech\/Regex<\/u><\/a><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"162\" width=\"162\">\n<p align=\"left\">boost<\/p>\n<\/td>\n<td data-colwidth=\"134\" width=\"134\">\n<p align=\"center\">C++<\/p>\n<\/td>\n<td>\n<p align=\"left\"><a href=\"https:\/\/github.com\/boostorg\/regex.git\" rel=\"noopener noreferrer nofollow\"><u>https:\/\/github.com\/boostorg\/regex.git<\/u><\/a><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"162\" width=\"162\">\n<p align=\"left\">hyperscan<\/p>\n<\/td>\n<td data-colwidth=\"134\" width=\"134\">\n<p align=\"center\">\u0421<\/p>\n<\/td>\n<td>\n<p align=\"left\"><a href=\"https:\/\/github.com\/intel\/hyperscan\" rel=\"noopener noreferrer nofollow\"><u>https:\/\/github.com\/intel\/hyperscan<\/u><\/a><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"162\" width=\"162\">\n<p align=\"left\">google-re2<\/p>\n<\/td>\n<td data-colwidth=\"134\" width=\"134\">\n<p align=\"center\">C++<\/p>\n<\/td>\n<td>\n<p align=\"left\"><a href=\"https:\/\/github.com\/google\/re2\" rel=\"noopener noreferrer nofollow\"><u>https:\/\/github.com\/google\/re2<\/u><\/a><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<h2>\u041c\u0435\u0442\u043e\u0434\u043e\u043b\u043e\u0433\u0438\u044f<\/h2>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0443\u0436\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u043a\u0430\u043a \u0431\u0443\u0434\u0435\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u043e\u0432.<\/p>\n<ol>\n<li>\n<p>\u0415\u0441\u0442\u044c \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0439 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u0442\u044c \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u043d\u0430\u0431\u043e\u0440\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0439 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p>\u0414\u043b\u044f \u0432\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043d\u0438\u044f \u0437\u0430\u043c\u0435\u0440\u043e\u0432 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0431\u0443\u0434\u0435\u043c \u0438\u0442\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u043a\u0430\u0436\u0434\u043e\u0435 (\u0438\u0437 <code>NR<\/code>) \u043f\u0440\u0430\u0432\u0438\u043b\u043e <code>IR<\/code> \u0440\u0430\u0437 \u043d\u0430 <code>ID<\/code> \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u044f\u0445 \u043d\u0430\u0431\u043e\u0440\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445 (\u0438\u0437 <code>ND<\/code>), \u0442.\u0435. \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u0430 \u0431\u0443\u0434\u0435\u0442: <code>SUM = IR * NR * ID * ND<\/code><\/p>\n<\/li>\n<li>\n<p>\u0414\u043b\u044f \u0441\u043d\u0438\u0436\u0435\u043d\u0438\u044f \u0432\u0437\u0430\u0438\u043c\u043d\u043e\u0433\u043e \u0432\u043b\u0438\u044f\u043d\u0438\u044f \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u043e\u0432 \u0434\u0440\u0443\u0433 \u043d\u0430 \u0434\u0440\u0443\u0433\u0430 \u0431\u0443\u0434\u0435\u043c \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u0430.<\/p>\n<\/li>\n<li>\n<p>\u0414\u043b\u044f \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u0430 \u043a\u043b\u043e\u043d\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0438\u0437 \u0435\u0433\u043e \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f, \u0438\u0437 \u0432\u0435\u0442\u043a\u0438 master \u0438\u043b\u0438 \u0442\u043e\u043b\u0435\u0440\u0430\u043d\u0442\u043d\u043e\u0433\u043e main.<\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a &#8212; \u044d\u0442\u043e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430, \u0442\u043e \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0435\u0433\u043e \u0441\u0431\u043e\u0440\u043a\u0430.<\/p>\n<\/li>\n<li>\n<p>\u041d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043a\u043e\u0434 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u043a\u043b\u0430\u0441\u0441\u0430 c \u0434\u0432\u0443\u043c\u044f \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u044b\u043c\u0438 \u043c\u0435\u0442\u043e\u0434\u0430\u043c\u0438 &#8212; \u043e\u0434\u0438\u043d \u0434\u043b\u044f \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0438 \u043f\u0440\u0430\u0432\u0438\u043b (\u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0438 \u0434\u043b\u044f \u0438\u0445 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438) \u0438 \u043e\u0434\u0438\u043d \u0434\u043b\u044f \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0430\u0432\u0438\u043b \u043d\u0430 \u043d\u0430\u0431\u043e\u0440\u0435 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0433\u043e\u043d\u043a\u0438 \u0431\u0443\u0434\u0435\u043c \u043d\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435 \u0432 \u043e\u0431\u043b\u0430\u043a\u0435<\/p>\n<\/li>\n<\/ol>\n<h2>\u0411\u043e\u043b\u044c\u0448\u0430\u044f \u0433\u043e\u043d\u043a\u0430<\/h2>\n<p>\u041a\u043e\u0434 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 <a href=\"https:\/\/github.com\/shvit\/regexp_checker\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/shvit\/regexp_checker<\/a><\/p>\n<p>\u0414\u043b\u044f \u0436\u0435\u043b\u0430\u044e\u0449\u0438\u0445 \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u0433\u043e\u043d\u043a\u0443 \u043d\u0430 \u0441\u0432\u043e\u0435\u043c \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0435, \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438. \u0414\u043b\u044f Ubuntu 20.04 (\u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0442\u0430\u043a\u0436\u0435 \u0438 \u0434\u043b\u044f <code>ubuntu-latest<\/code>):<\/p>\n<p><code>sudo apt install build-essential cmake ragel git libboost-all-dev<\/code><\/p>\n<p><code>git clone https:\/\/github.com\/abseil\/abseil-cpp abseil-cpp &amp;&amp; cd abseil-cpp &amp;&amp; mkdir -p bin &amp;&amp; cd bin &amp;&amp; cmake -DCMAKE_CXX_STANDARD=17 -DCMAKE_POSITION_INDEPENDENT_CODE=ON .. &amp;&amp; cmake --build . &amp;&amp; sudo cmake --install .<\/code> <\/p>\n<p>\u0442\u0435\u043f\u0435\u0440\u044c \u043a\u043b\u043e\u043d\u0438\u0440\u0443\u0435\u043c \u0433\u043e\u043d\u043a\u0443 \u0441\u0435\u0431\u0435 \u043d\u0430 \u043a\u043e\u043c\u043f \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c<\/p>\n<p><code>git clone https:\/\/github.com\/shvit\/regexp_checker<br \/>cd regexp_checker<br \/>make check<\/code><\/p>\n<p>\u041f\u0440\u043e\u0449\u0435, \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0436\u0435, \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0433\u043e\u0442\u043e\u0432\u044b\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043d\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u043a\u0435 \u0432 GitHub Actions:<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td data-colwidth=\"230\" width=\"230\">\n<p align=\"center\">\u0423\u0447\u0430\u0441\u0442\u043d\u0438\u043a<\/p>\n<\/td>\n<td data-colwidth=\"249\" width=\"249\">\n<p align=\"center\">\u0412\u0440\u0435\u043c\u044f<\/p>\n<\/td>\n<td>\n<p align=\"center\">\u041c\u0435\u0441\u0442\u043e<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"230\" width=\"230\">\n<p align=\"left\"><a href=\"https:\/\/github.com\/boostorg\/regex.git\" rel=\"noopener noreferrer nofollow\">boost<\/a><\/p>\n<\/td>\n<td data-colwidth=\"249\" width=\"249\">\n<p align=\"left\"><a href=\"https:\/\/github.com\/shvit\/regexp_checker\/actions\/runs\/8971493308\/job\/24637348211#step:6:47\" rel=\"noopener noreferrer nofollow\">4.914s<\/a><\/p>\n<\/td>\n<td>\n<p align=\"center\">2<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"230\" width=\"230\">\n<p align=\"left\"><a href=\"https:\/\/github.com\/google\/re2\" rel=\"noopener noreferrer nofollow\">google-re2<\/a><\/p>\n<\/td>\n<td data-colwidth=\"249\" width=\"249\">\n<p align=\"left\"><a href=\"https:\/\/github.com\/shvit\/regexp_checker\/actions\/runs\/8971493308\/job\/24637348211#step:6:48\" rel=\"noopener noreferrer nofollow\">16.012s<\/a><\/p>\n<\/td>\n<td>\n<p align=\"center\">3<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"230\" width=\"230\">\n<p align=\"left\"><a href=\"https:\/\/github.com\/intel\/hyperscan\" rel=\"noopener noreferrer nofollow\">hyperscan<\/a><\/p>\n<\/td>\n<td data-colwidth=\"249\" width=\"249\">\n<p align=\"left\"><a href=\"https:\/\/github.com\/shvit\/regexp_checker\/actions\/runs\/8971493308\/job\/24637348211#step:6:49\" rel=\"noopener noreferrer nofollow\">0.826s<\/a><\/p>\n<\/td>\n<td>\n<p align=\"center\">1<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"230\" width=\"230\">\n<p align=\"left\">stdlib<\/p>\n<\/td>\n<td data-colwidth=\"249\" width=\"249\">\n<p align=\"left\"><a href=\"https:\/\/github.com\/shvit\/regexp_checker\/actions\/runs\/8971493308\/job\/24637348211#step:6:50\" rel=\"noopener noreferrer nofollow\">65.517s<\/a><\/p>\n<\/td>\n<td>\n<p align=\"center\">6<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"230\" width=\"230\">\n<p align=\"left\"><a href=\"https:\/\/github.com\/kokke\/tiny-regex-c\" rel=\"noopener noreferrer nofollow\">tiny-regex-c<\/a><\/p>\n<\/td>\n<td data-colwidth=\"249\" width=\"249\">\n<p align=\"left\"><a href=\"https:\/\/github.com\/shvit\/regexp_checker\/actions\/runs\/8971493308\/job\/24637348211#step:6:51\" rel=\"noopener noreferrer nofollow\">23.288s<\/a><\/p>\n<\/td>\n<td>\n<p align=\"center\">4<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"230\" width=\"230\">\n<p align=\"left\"><a href=\"https:\/\/github.com\/ximtech\/Regex\" rel=\"noopener noreferrer nofollow\">ximtech<\/a><\/p>\n<\/td>\n<td data-colwidth=\"249\" width=\"249\">\n<p align=\"left\"><a href=\"https:\/\/github.com\/shvit\/regexp_checker\/actions\/runs\/8971493308\/job\/24637348211#step:6:52\" rel=\"noopener noreferrer nofollow\">51.421s<\/a><\/p>\n<\/td>\n<td>\n<p align=\"center\">5<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438, \u0432\u043c\u0435\u0441\u0442\u043e \u044e\u043d\u0438\u0442 \u0442\u0435\u0441\u0442\u043e\u0432 &#8212; \u0432\u0441\u0435 \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u0438 \u0432\u044b\u0434\u0430\u043b\u0438 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u0439 &#8212; \u043f\u043e <code>2'800'000<\/code>.<\/p>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u043b\u0438\u0441\u044c \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438: <code>NR=10, IR=20'000, ND=5, ID=10<\/code>. \u041e\u0431\u0449\u0435\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u0430 <code>SUM=10'000'000<\/code>.<\/p>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>\u041f\u0440\u0438 \u0442\u0435\u043a\u0443\u0449\u0435\u043c \u0441\u043e\u0441\u0442\u0430\u0432\u0435 \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u043e\u0432 \u0431\u0435\u0441\u0441\u043f\u043e\u0440\u043d\u044b\u043c \u0447\u0435\u043c\u043f\u0438\u043e\u043d\u043e\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0435\u043a\u0442 <code>hyperscan<\/code>, \u043d\u043e \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0440\u0430\u0434\u043e\u0432\u0430\u043b \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a \u0437\u0430\u043d\u044f\u0432\u0448\u0438\u0439 \u0432\u0442\u043e\u0440\u043e\u0435 \u043c\u0435\u0441\u0442\u043e &#8212; <code>boost<\/code>.<\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u044b <code>tiny-regex-c<\/code> \u0438 <code>ximtech<\/code> \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442 \u0441\u043e\u043a\u0440\u0430\u0449\u0435\u043d\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 regexp, \u0438\u0437-\u0437\u0430 \u0447\u0435\u0433\u043e \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u0440\u0430\u0432\u0438\u043b. \u041f\u0440\u043e\u0435\u043a\u0442 <code>ximtech<\/code> \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0430 <code>tiny-regex-c<\/code>. \u0422\u0430\u043a\u0436\u0435 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 <code>tiny-regex-c<\/code> \u0435\u0441\u0442\u044c \u0431\u0430\u0433\u0438 \u0438 \u0442\u0430\u043a\u0436\u0435 \u043e\u043d \u043d\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u043e\u0434\u043d\u043e\u0433\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0438\u0437-\u0437\u0430 \u0441\u0432\u043e\u0435\u0439 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b.<\/p>\n<p>\u0414\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430 <code>google-re2<\/code> \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a <code>Abseil<\/code> \u0438 \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043d\u0435 \u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u043b\u0438\u043d\u043a\u043e\u0432\u043a\u0430 \u0433\u043e\u0442\u043e\u0432\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/p>\n<p>\u0412 \u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435, \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0443 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 <code>hyperscan<\/code> \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043f\u0440\u0430\u0432\u0438\u043b \u043d\u0430 \u043f\u043e\u0442\u043e\u043a\u0430\u0445 (streams), \u0447\u0442\u043e \u0432 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0440\u0435\u0448\u0430\u044e\u0449\u0438\u043c.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u043a\u0442\u043e-\u0442\u043e \u0437\u043d\u0430\u0435\u0442 \u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u043e\u0432 \u0433\u043e\u043d\u043a\u0438 &#8212; \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0439\u0442\u0435 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445.<\/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\/812953\/\"> https:\/\/habr.com\/ru\/articles\/812953\/<\/a><br \/><\/br><\/br><\/p>\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-375660","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/375660","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=375660"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/375660\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=375660"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=375660"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=375660"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}