Regular Expressions 101

Save & Share

Flavor

  • PCRE2 (PHP >=7.3)
  • PCRE (PHP <7.3)
  • ECMAScript (JavaScript)
  • Python
  • Golang
  • Java 8
  • .NET 7.0 (C#)
  • Rust
  • Regex Flavor Guide

Function

  • Match
  • Substitution
  • List
  • Unit Tests

Tools

Sponsors
There are currently no sponsors. Become a sponsor today!
An explanation of your regex will be automatically generated as you type.
Detailed match information will be displayed here automatically.
  • All Tokens
  • Common Tokens
  • General Tokens
  • Anchors
  • Meta Sequences
  • Quantifiers
  • Group Constructs
  • Character Classes
  • Flags/Modifiers
  • Substitution
  • A single character of: a, b or c
    [abc]
  • A character except: a, b or c
    [^abc]
  • A character in the range: a-z
    [a-z]
  • A character not in the range: a-z
    [^a-z]
  • A character in the range: a-z or A-Z
    [a-zA-Z]
  • Any single character
    .
  • Alternate - match either a or b
    a|b
  • Any whitespace character
    \s
  • Any non-whitespace character
    \S
  • Any digit
    \d
  • Any non-digit
    \D
  • Any word character
    \w
  • Any non-word character
    \W
  • Non-capturing group
    (?:...)
  • Capturing group
    (...)
  • Zero or one of a
    a?
  • Zero or more of a
    a*
  • One or more of a
    a+
  • Exactly 3 of a
    a{3}
  • 3 or more of a
    a{3,}
  • Between 3 and 6 of a
    a{3,6}
  • Start of string
    ^
  • End of string
    $
  • A word boundary
    \b
  • Non-word boundary
    \B

Regular Expression

/
/
gm

Test String

Code Generator

Generated Code

// include the latest version of the regex crate in your Cargo.toml extern crate regex; use regex::Regex; fn main() { let regex = Regex::new(r#"(?m)<h3 class="r"><a href="(.*)" ping=".* target="_blank">(.*)<\/a><\/h3>.*<span class="st">(.*)<\/span><\/div>.* "#).unwrap(); let string = "})();</script><div id=\"sfcnt\"><div id=\"sform\"></div></div><script nonce=\"c8loNlRhIkx3UeDLrR1hHw==\">(function(){var a={gen204:\"sct\",clearcut:100};var b=google.time();google.tick(\"load\",a,b);google.tick(\"webaft\",a,b);}).call(this);</script><div id=\"dc\"></div><div id=\"subform_ctrl\"></div><div id=\"bst\" style=\"display:none\"></div><div id=\"top_nav\"><style>.t6psHzYPBsD__highlighted{}.t6psHzYPBsD__separator{}.rwUYcf{display:inline-block}.Cq34nf{cursor:pointer}.cF4V5c{background:white;box-shadow:0 2px 10px 0 rgba(0,0,0,0.2);outline:none;padding:5px 0;position:absolute}a.f9UGee,a.f9UGee:visited{color:inherit;cursor:pointer;display:block;line-height:23px;outline:0;padding:3px 16px;text-decoration:inherit;white-space:nowrap}.f9UGee.t6psHzYPBsD__highlighted{background:rgba(0,0,0,0.1)}.t6psHzYPBsD__separator{border-top:1px solid #ddd;cursor:default;height:0;margin:5px 0;overflow:hidden;padding:0}#ab_ctls a{text-decoration:none}#ab_ctls a.ab_button:active,#ab_ctls a.ab_dropdownlnk:active{color:#333}.hdtb-mn-cont{height:22px;white-space:nowrap}.hdtb-mn-hd{color:#777;display:inline-block;position:relative;padding-top:0;padding-bottom:0;padding-right:22px;padding-left:16px;line-height:22px;cursor:pointer}#hdtb-mn-gp{display:inline-block;width:150px}.ktf{-webkit-border-radius:1px;-webkit-box-sizing:content-box;background-color:#fff;border:1px solid #d9d9d9;border-top:1px solid #c0c0c0;box-sizing:content-box;color:#333;display:inline-block;height:29px;line-height:27px;padding-left:8px;vertical-align:top}.ktf:hover{-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1);border:1px solid #b9b9b9;border-top:1px solid #a0a0a0;box-shadow:inset 0 1px 2px rgba(0,0,0,0.1)}.ktf:focus{-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.3);border:1px solid #4d90fe;box-shadow:inset 0 1px 2px rgba(0,0,0,0.3);outline:none}.ktf.mini{font-size:11px;height:17px;line-height:17px;padding:0 2px}.ksb.mini{-webkit-box-sizing:content-box;box-sizing:content-box;height:17px;line-height:17px;min-width:0}</style><div jsl=\"$t t-js5htJpaNsk;$x 0;\" class=\"r-iXvYAiW_ZJ6o\"><div class=\"hdtbna notl\" id=\"hdtb\" role=\"navigation\" tabindex=\"0\"><div id=\"hdtbSum\"><div id=\"hdtb-s\" style=\"white-space:nowrap\"><div><div id=\"hdtb-msb\"><div><div id=\"hdtb-msb-vis\"><div class=\"hdtb-mitem hdtb-msel hdtb-imb\">Все</div><div class=\"hdtb-mitem hdtb-imb\"><a class=\"q qs\" href=\"/search?q=site:mediaalyans.by&amp;num=100&amp;newwindow=1&amp;biw=1920&amp;bih=974&amp;source=lnms&amp;tbm=isch&amp;sa=X&amp;ved=0ahUKEwj2lM-vstDbAhXnwVkKHWzLAbg4ZBD8BQgKKAE\">Картинки</a></div><div class=\"hdtb-mitem hdtb-imb\"><a class=\"q qs\" href=\"/search?q=site:mediaalyans.by&amp;num=100&amp;newwindow=1&amp;biw=1920&amp;bih=974&amp;source=lnms&amp;tbm=nws&amp;sa=X&amp;ved=0ahUKEwj2lM-vstDbAhXnwVkKHWzLAbg4ZBD8BQgLKAI\">Новости</a></div><div class=\"hdtb-mitem hdtb-imb\"><a class=\"q qs\" href=\"https://maps.google.com/maps?q=site:mediaalyans.by&amp;num=100&amp;newwindow=1&amp;filter=0&amp;biw=1920&amp;bih=974&amp;um=1&amp;ie=UTF-8&amp;sa=X&amp;ved=0ahUKEwj2lM-vstDbAhXnwVkKHWzLAbg4ZBD8BQgMKAM\">Карты</a></div></div><g-header-menu class=\"hdtb-mitem rwUYcf r-irCgTEzweik4\" jsl=\"$t t-Nfexb0d83t0;$x 0;\"><a class=\"Cq34nf irCgTEzweik4-_UwgkgYBDrI hdtb-dd-b\" aria-haspopup=\"true\" role=\"button\" tabindex=\"0\" jsaction=\"r.mSRaIWm1OeU\" data-rtid=\"irCgTEzweik4\" jsl=\"$x 1;\">Ещё</a><div class=\"cF4V5c irCgTEzweik4-4ixgWLBslXg\" style=\"display:none\" role=\"menu\" tabindex=\"-1\" jsaction=\"keydown:r.1rILPBv56Z8\" data-rtid=\"irCgTEzweik4\" jsl=\"$x 2;\" data-ved=\"0ahUKEwj2lM-vstDbAhXnwVkKHWzLAbg4ZBDaHwgNKAQ\"><a class=\"f9UGee q qs\" role=\"menuitem\" tabindex=\"-1\" jsaction=\"mouseover:r.1-l5Y2Ws2-4\" data-rtid=\"irCgTEzweik4\" jsl=\"$x 3;\" href=\"/search?q=site:mediaalyans.by&amp;num=100&amp;newwindow=1&amp;biw=1920&amp;bih=974&amp;source=lnms&amp;tbm=vid&amp;sa=X&amp;ved=0ahUKEwj2lM-vstDbAhXnwVkKHWzLAbg4ZBD8BQgOKAA\">Видео</a><a class=\"f9UGee q qs\" role=\"menuitem\" tabindex=\"-1\" jsaction=\"mouseover:r.1-l5Y2Ws2-4\" data-rtid=\"irCgTEzweik4\" jsl=\"$x 3;\" href=\"/search?q=site:mediaalyans.by&amp;num=100&amp;newwindow=1&amp;biw=1920&amp;bih=974&amp;source=lnms&amp;tbm=bks&amp;sa=X&amp;ved=0ahUKEwj2lM-vstDbAhXnwVkKHWzLAbg4ZBD8BQgPKAE\">Книги</a><a class=\"f9UGee q qs\" role=\"menuitem\" tabindex=\"-1\" jsaction=\"mouseover:r.1-l5Y2Ws2-4\" data-rtid=\"irCgTEzweik4\" jsl=\"$x 3;\" href=\"https://www.google.com/flights?q=site:mediaalyans.by&amp;num=100&amp;newwindow=1&amp;biw=1920&amp;bih=974&amp;source=lnms&amp;tbm=flm&amp;sa=X&amp;ved=0ahUKEwj2lM-vstDbAhXnwVkKHWzLAbg4ZBD8BQgQKAI\">Авиабилеты</a><a class=\"f9UGee q qs\" role=\"menuitem\" tabindex=\"-1\" jsaction=\"mouseover:r.1-l5Y2Ws2-4\" data-rtid=\"irCgTEzweik4\" jsl=\"$x 3;\" href=\"/search?q=site:mediaalyans.by&amp;num=100&amp;newwindow=1&amp;biw=1920&amp;bih=974&amp;source=lnms&amp;tbm=fin&amp;sa=X&amp;ved=0ahUKEwj2lM-vstDbAhXnwVkKHWzLAbg4ZBD8BQgRKAM\">Финансы</a></div></g-header-menu></div><div><g-header-menu class=\"hdtb-mitem rwUYcf r-iScQRcaSn8VI\" id=\"ab_options\" jsl=\"$t t-Nfexb0d83t0;$x 0;\"><a class=\"Cq34nf iScQRcaSn8VI-_UwgkgYBDrI hdtb-dd-b\" aria-haspopup=\"true\" role=\"button\" tabindex=\"0\" jsaction=\"r.mSRaIWm1OeU\" data-rtid=\"iScQRcaSn8VI\" jsl=\"$x 1;\" href=\"/preferences\" id=\"abar_button_opt\">Настройки</a><div class=\"cF4V5c iScQRcaSn8VI-4ixgWLBslXg\" style=\"display:none\" role=\"menu\" tabindex=\"-1\" jsaction=\"keydown:r.1rILPBv56Z8\" data-rtid=\"iScQRcaSn8VI\" jsl=\"$x 2;\" data-ved=\"0ahUKEwj2lM-vstDbAhXnwVkKHWzLAbg4ZBCf9gEIEigA\"><a class=\"f9UGee\" role=\"menuitem\" tabindex=\"-1\" jsaction=\"mouseover:r.1-l5Y2Ws2-4\" data-rtid=\"iScQRcaSn8VI\" jsl=\"$x 3;\" href=\"/preferences?hl=ru&amp;prev=https://www.google.com/search?q%3Dsite:mediaalyans.by%26num%3D100%26newwindow%3D1%26ei%3DyOwgW7SGGcXt5gKdqa6oCw%26start%3D100%26sa%3DN%26filter%3D0%26biw%3D1920%26bih%3D974\" data-ved=\"0ahUKEwj2lM-vstDbAhXnwVkKHWzLAbg4ZBCj-gEIEw\">Настройки поиска</a><a class=\"f9UGee\" role=\"menuitem\" tabindex=\"-1\" jsaction=\"mouseover:r.1-l5Y2Ws2-4\" data-rtid=\"iScQRcaSn8VI\" jsl=\"$x 3;\" href=\"/preferences?hl=ru&amp;prev=https://www.google.com/search?q%3Dsite:mediaalyans.by%26num%3D100%26newwindow%3D1%26ei%3DyOwgW7SGGcXt5gKdqa6oCw%26start%3D100%26sa%3DN%26filter%3D0%26biw%3D1920%26bih%3D974#languages\" data-ved=\"0ahUKEwj2lM-vstDbAhXnwVkKHWzLAbg4ZBCj-gEIFA\"><span>Языки</span><span style=\"margin-left:3px\"> (Languages)</span></a><a class=\"f9UGee\" role=\"menuitem\" tabindex=\"-1\" jsaction=\"mouseover:r.1-l5Y2Ws2-4;m.cbbl\" data-rtid=\"iScQRcaSn8VI\" jsl=\"$x 3;\" href=\"/setprefs?safeui=on&amp;sig=0_g6a5TfDS9Lc-0z5i6JYClADOgYA%3D&amp;prev=https://www.google.com/search?q%3Dsite:mediaalyans.by%26num%3D100%26newwindow%3D1%26ei%3DyOwgW7SGGcXt5gKdqa6oCw%26start%3D100%26sa%3DN%26filter%3D0%26biw%3D1920%26bih%3D974\" id=\"safesearch\" data-ved=\"0ahUKEwj2lM-vstDbAhXnwVkKHWzLAbg4ZBCj-gEIFQ\"><div>Включить Безопасный поиск</div></a><a class=\"f9UGee\" role=\"menuitem\" tabindex=\"-1\" jsaction=\"mouseover:r.1-l5Y2Ws2-4\" data-rtid=\"iScQRcaSn8VI\" jsl=\"$x 3;\" href=\"/advanced_search?q=site:mediaalyans.by&amp;num=100&amp;newwindow=1&amp;biw=1920&amp;bih=974&amp;hl=ru\" data-ved=\"0ahUKEwj2lM-vstDbAhXnwVkKHWzLAbg4ZBCj-gEIFg\">Расширенный поиск</a><a class=\"f9UGee\" role=\"menuitem\" tabindex=\"-1\" jsaction=\"mouseover:r.1-l5Y2Ws2-4\" data-rtid=\"iScQRcaSn8VI\" jsl=\"$x 3;\" href=\"/history/?hl=ru\" data-ved=\"0ahUKEwj2lM-vstDbAhXnwVkKHWzLAbg4ZBCj-gEIFw\">История</a><a class=\"f9UGee\" role=\"menuitem\" tabindex=\"-1\" jsaction=\"mouseover:r.1-l5Y2Ws2-4\" data-rtid=\"iScQRcaSn8VI\" jsl=\"$x 3;\" href=\"//support.google.com/websearch/?source=g&amp;hl=ru-BY\" data-ved=\"0ahUKEwj2lM-vstDbAhXnwVkKHWzLAbg4ZBCj-gEIGA\">Поиск в справке</a></div></g-header-menu><a style=\"display:\" class=\"hdtb-tl\" id=\"hdtb-tls\" role=\"button\" tabindex=\"0\" data-ved=\"0ahUKEwj2lM-vstDbAhXnwVkKHWzLAbg4ZBDbHwgZ\">Инструменты</a></div></div></div><ol id=\"ab_ctls\"></ol></div></div><div class=\"hdtb-td-c hdtb-td-h\" aria-expanded=\"false\" id=\"hdtbMenus\" tabindex=\"0\" data-ved=\"0ahUKEwj2lM-vstDbAhXnwVkKHWzLAbg4ZBDcHwga\"></div></div></div></div><div id=\"before-appbar\"></div><div class=\"appbar\" id=\"appbar\"><style>#resultStats{position:absolute;top:0;-webkit-transition:all 220ms ease-in-out;}.hdtb-ab-o #resultStats{opacity:0;top:13px}</style><div id=\"extabar\"><div id=\"topabar\" style=\"position:relative\"><div class=\"ab_tnav_wrp\" id=\"slim_appbar\"><div id=\"sbfrm_l\"><div id=\"resultStats\">Результатов: 109, страница 2<nobr> (0,17 сек.)&nbsp;</nobr></div></div></div></div><div style=\"display:none\" id=\"botabar\"></div></div><div></div></div><div class=\"mw\" id=\"ucs\"></div><div id=\"ataw\"><div id=\"atvcap\"></div></div><div class=\"mw\"><div id=\"rcnt\" style=\"clear:both;position:relative;zoom:1\"><div id=\"bcenter\"><div class=\"col\" style=\"width:0\"></div></div><div class=\"col\" style=\"width:0\"><div id=\"center_col\"><div id=\"taw\"><style>.spell{font-size:18px}.spell_orig{font-size:15px}#mss p{margin:0;padding-top:5px}</style><div></div><div style=\"padding:0 16px\"><div class=\"med\"><div class=\"WsjYwc\" id=\"msg_box\" style=\"display:none\"><p class=\"card-section w4VK3c\"><span><span class=\"spell\" id=\"srfm\"></span>&nbsp;<a class=\"spell\" id=\"srfl\"></a><br></span><span id=\"sif\"><span class=\"spell_orig\" id=\"sifm\"></span>&nbsp;<a class=\"spell_orig\" id=\"sifl\"></a><br></span></p></div></div></div><div id=\"tvcap\"></div></div><div class=\"med\" id=\"res\" role=\"main\"><div id=\"topstuff\"></div><div id=\"search\"><style>.Fam1ne{background-repeat:repeat-x;display:inline-block;overflow:hidden;position:relative}.Fam1ne span{background-repeat:repeat-x;display:block}.KsUr1 .Fam1ne,.Fam1ne.sCCsuc{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAQAAAADQ4RFAAAA6klEQVR4AZXQMWsCMRiH8SAnQacODgpyg8rh1EEQHXS5xaUdXA5KRUHo+/2/wdN3aBNK34TEZ0rCD86/S/140ZydI9WrVo3etUrk+dJ8Hdog2qYO9YjW16ARD0R7MCpHC+SnRTk6BHQoR0NAg43WvP1LYsbrWh0tN6SwG+3v53n6ItLj//6nFfcsuLOyhphwSZILk/R6nUm6/OQzE83yaGeiXR5dTXTNoSmSaJpGWyQ0aBLaplGc/EijHePkKdTwRLQP5uFurifRnjQ2ahHtzBhHbKw3orU2OvHJEme01JeTjfZ4XCLPPp6+AYsy7RMdMSvnAAAAAElFTkSuQmCC)}.KsUr1 .Fam1ne span,.Fam1ne.sCCsuc span{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAQAAAADQ4RFAAAA9klEQVR4AZXUoY7iUABG4SYYEgwYwhOsx4MlqUaAQ/AGMxqHIUHDC4DnATaMx7MORVAEh5vAtzUN7M69TXuOurc5SfuLJjH8ykzCJmJ++qgefWVWjJq+M5vVojEYV4s2YFMlqrmBm1r5qC+nXz5ayFmUj/7IOYajkd//uffO/sfzUdZJXZTlIs1fr2WrDFutf79p6KqIq2FoiLadGDvt+HoTISbFk3eF6BZHMyFmxdFBiENR1PEU4qkTj6ZeHDNfTONRPvnDUj1z6ZFPHovq7uCkJ7/rOYG7ejhKwVrD+23DGqThaOVsIAk4cLYKR3NN8b/T/HX6C7jRb/QEnjPPAAAAAElFTkSuQmCC)}.tPhRLe{background:url(/images/nav_logo242.png) no-repeat -100px -260px;display:inline-block;height:13px;overflow:hidden;position:relative;top:1px;width:65px}.tPhRLe span{background:url(/images/nav_logo242.png) no-repeat -100px -275px;display:block;height:13px;width:65px}.ghri8e{text-align:center}.ghri8e a{display:inline-block;padding-top:8px}</style><div data-ved=\"0ahUKEwj2lM-vstDbAhXnwVkKHWzLAbg4ZBAaCCI\"><!--a--><h2 class=\"hd\">Результаты поиска</h2><div data-async-context=\"query:site%3Amediaalyans.by\" id=\"ires\"><div eid=\"2OwgW_bIA-eD5wLslofACw\" id=\"rso\"><div class=\"bkWMgd\"><div class=\"srg\"><div class=\"g\"><!--m--><div data-hveid=\"36\" data-ved=\"0ahUKEwj2lM-vstDbAhXnwVkKHWzLAbg4ZBAVCCQoADAA\"><div class=\"rc\"> <h3 class=\"r\"><a href=\"http://torcevik.mediaalyans.by/catalog/spomasz/spw-lr/\" ping=\"/url?sa=t&amp;source=web&amp;rct=j&amp;url=http://torcevik.mediaalyans.by/catalog/spomasz/spw-lr/&amp;ved=0ahUKEwj2lM-vstDbAhXnwVkKHWzLAbg4ZBAWCCUwAA\" target=\"_blank\">Уплотнения SPw, LR для насосов - «САМ-НЭЛЬ» +375 17 221-06-51</a></h3><div class=\"s\"><div><div class=\"f hJND5c TbwUpd\" style=\"white-space:nowrap\"><cite class=\"iUh30\">torcevik.mediaalyans.by/catalog/spomasz/spw-lr/</cite><div class=\"action-menu ab_ctl\"><a class=\"GHDvEf ab_button\" href=\"#\" id=\"am-b100\" aria-label=\"Подробнее...\" aria-expanded=\"false\" aria-haspopup=\"true\" role=\"button\" jsaction=\"m.tdd;keydown:m.hbke;keypress:m.mskpe\" data-ved=\"0ahUKEwj2lM-vstDbAhXnwVkKHWzLAbg4ZBDsHQgmMAA\"><span class=\"mn-dwn-arw\"></span></a><div class=\"action-menu-panel ab_dropdown\" role=\"menu\" tabindex=\"-1\" jsaction=\"keydown:m.hdke;mouseover:m.hdhne;mouseout:m.hdhue\" data-ved=\"0ahUKEwj2lM-vstDbAhXnwVkKHWzLAbg4ZBCpHwgnMAA\"><ol><li class=\"action-menu-item ab_dropdownitem\" role=\"menuitem\"><a class=\"fl\" href=\"http://webcache.googleusercontent.com/search?q=cache:YEN1dxngcR0J:torcevik.mediaalyans.by/catalog/spomasz/spw-lr/+&amp;cd=101&amp;hl=ru&amp;ct=clnk&amp;gl=by\" ping=\"/url?sa=t&amp;source=web&amp;rct=j&amp;url=http://webcache.googleusercontent.com/search%3Fq%3Dcache:YEN1dxngcR0J:torcevik.mediaalyans.by/catalog/spomasz/spw-lr/%2B%26cd%3D101%26hl%3Dru%26ct%3Dclnk%26gl%3Dby&amp;ved=0ahUKEwj2lM-vstDbAhXnwVkKHWzLAbg4ZBAgCCgwAA\" target=\"_blank\">Сохраненная&nbsp;копия</a></li></ol></div></div></div><div class=\"slp f\"><g-review-stars><span class=\"tPhRLe\" aria-label=\"Оценка: 4,0 из 5,\"><span style=\"width:53px\"></span></span></g-review-stars> Рейтинг: 79&#37; - ‎4 голоса</div><span class=\"st\">SPw, LR Торцевые уплотнения высокого качества от известных брендов. Гарантия. Доставка.</span></div></div></div></div><!--n--></div><div class=\"g\"><!--m--><div data-hveid=\"42\" data-ved=\"0ahUKEwj2lM-vstDbAhXnwVkKHWzLAbg4ZBAVCCooATAB\"><div class=\"rc\"> <h3 class=\"r\"><a href=\"http://torcevik.mediaalyans.by/catalog/lowara/e-nsc/\" ping=\"/url?sa=t&amp;source=web&amp;rct=j&amp;url=http://torcevik.mediaalyans.by/catalog/lowara/e-nsc/&amp;ved=0ahUKEwj2lM-vstDbAhXnwVkKHWzLAbg4ZBAWCCswAQ\" target=\"_blank\">e-NSC * SAM-NEL - Компания САМ-НЭЛЬ</a></h3><div class=\"s\"><div><div class=\"f hJND5c TbwUpd\" style=\"white-space:nowrap\"><cite class=\"iUh30\">torcevik.mediaalyans.by/catalog/lowara/e-nsc/</cite></div><div class=\"slp f\"><g-review-stars><span class=\"tPhRLe\" aria-label=\"Оценка: 4,0 из 5,\"><span style=\"width:53px\"></span></span></g-review-stars> Рейтинг: 79&#37; - ‎4 голоса</div><span class=\"st\">e-NSC Торцевые уплотнения высокого качества от известных брендов. Гарантия. Доставка.</span></div></div></div></div><!--n--></div><div class=\"g\"><!--m--><div data-hveid=\"45\" data-ved=\"0ahUKEwj2lM-vstDbAhXnwVkKHWzLAbg4ZBAVCC0oAjAC\"><div class=\"rc\"> <h3 class=\"r\"><a href=\"http://www.mediaalyans.by/reklama-na-transporte/\" ping=\"/url?sa=t&amp;source=web&amp;rct=j&amp;url=http://www.mediaalyans.by/reklama-na-transporte/&amp;ved=0ahUKEwj2lM-vstDbAhXnwVkKHWzLAbg4ZBAWCC4wAg\" target=\"_blank\">Реклама в электричках - Медиа Альянс</a></h3><div class=\"s\"><div><div class=\"f hJND5c TbwUpd\" style=\"white-space:nowrap\"><cite class=\"iUh30\">www.mediaalyans.by/reklama-na-transporte/</cite><div class=\"action-menu ab_ctl\"><a class=\"GHDvEf ab_button\" href=\"#\" id=\"am-b102\" aria-label=\"Подробнее...\" aria-expanded=\"false\" aria-haspopup=\"true\" role=\"button\" jsaction=\"m.tdd;keydown:m.hbke;keypress:m.mskpe\" data-ved=\"0ahUKEwj2lM-vstDbAhXnwVkKHWzLAbg4ZBDsHQgvMAI\"><span class=\"mn-dwn-arw\"></span></a><div class=\"action-menu-panel ab_dropdown\" role=\"menu\" tabindex=\"-1\" jsaction=\"keydown:m.hdke;mouseover:m.hdhne;mouseout:m.hdhue\" data-ved=\"0ahUKEwj2lM-vstDbAhXnwVkKHWzLAbg4ZBCpHwgwMAI\"><ol><li class=\"action-menu-item ab_dropdownitem\" role=\"menuitem\"><a class=\"fl\" href=\"http://webcache.googleusercontent.com/search?q=cache:9qXDxVBDu5IJ:www.mediaalyans.by/reklama-na-transporte/+&amp;cd=103&amp;hl=ru&amp;ct=clnk&amp;gl=by\" ping=\"/url?sa=t&amp;source=web&amp;rct=j&amp;url=http://webcache.googleusercontent.com/search%3Fq%3Dcache:9qXDxVBDu5IJ:www.mediaalyans.by/reklama-na-transporte/%2B%26cd%3D103%26hl%3Dru%26ct%3Dclnk%26gl%3Dby&amp;ved=0ahUKEwj2lM-vstDbAhXnwVkKHWzLAbg4ZBAgCDEwAg\" target=\"_blank\">Сохраненная&nbsp;копия</a></li></ol></div></div></div><span class=\"st\">Сегодня реклама в электричках — двигатель потребления бюджетной аудитории. Пенсионеры, студенты, дачники, гости столицы и жители областных&nbsp;...</span></div></div></div></div><!--n--></div><div class=\"g\"><!--m--><div data-hveid=\"50\" data-ved=\"0ahUKEwj2lM-vstDbAhXnwVkKHWzLAbg4ZBAVCDIoAzAD\"><div class=\"rc\"> <h3 class=\"r\"><a href=\"http://www.mediaalyans.by/nteo/a9yasuragi1ba20i0910191-88\" ping=\"/url?sa=t&amp;source=web&amp;rct=j&amp;url=http://www.mediaalyans.by/nteo/a9yasuragi1ba20i0910191-88&amp;ved=0ahUKEwj2lM-vstDbAhXnwVkKHWzLAbg4ZBAWCDMwAw\" target=\"_blank\">木魚 &gt; 本楠龍彫摺漆:仏壇仏具墓石やすらぎ - mediaalyans.by</a></h3><div class=\"s\"><div><div class=\"f hJND5c TbwUpd\" style=\"white-space:nowrap\"><cite class=\"iUh30\">www.mediaalyans.by/nteo/a9yasuragi1ba20i0910191-88</cite> - <a class=\"fl\" href=\"https://translate.google.com/translate?hl=ru&amp;sl=ja&amp;u=http://www.mediaalyans.by/nteo/a9yasuragi1ba20i0910191-88&amp;prev=search\" ping=\"/url?sa=t&amp;source=web&amp;rct=j&amp;url=https://translate.google.com/translate%3Fhl%3Dru%26sl%3Dja%26u%3Dhttp://www.mediaalyans.by/nteo/a9yasuragi1ba20i0910191-88%26prev%3Dsearch&amp;ved=0ahUKEwj2lM-vstDbAhXnwVkKHWzLAbg4ZBDuAQg1MAM\" target=\"_blank\">Перевести эту страницу</a></div><span class=\"st\">木魚 &gt; 本楠龍彫摺漆:仏壇仏具墓石やすらぎ. 2017-12-01 ☆本楠龍彫木魚 摺漆 5.0<wbr>寸(15cm) ☆これはいい値!</span></div></div></div></div><!--n--></div><div class=\"g\"><!--m--><div data-hveid=\"54\" data-ved=\"0ahUKEwj2lM-vstDbAhXnwVkKHWzLAbg4ZBAVCDYoBDAE\"><div class=\"rc\"> <h3 class=\"r\"><a href=\"http://www.mediaalyans.by/reklama-v-metro/listovki-v-metro/\" ping=\"/url?sa=t&amp;source=web&amp;rct=j&amp;url=http://www.mediaalyans.by/reklama-v-metro/listovki-v-metro/&amp;ved=0ahUKEwj2lM-vstDbAhXnwVkKHWzLAbg4ZBAWCDcwBA\" target=\"_blank\">Реклама в вагонах метро - Медиа Альянс</a></h3><div class=\"s\"><div><div class=\"f hJND5c TbwUpd\" style=\"white-space:nowrap\"><cite class=\"iUh30\">www.mediaalyans.by/reklama-v-metro/listovki-v-metro/</cite><div class=\"action-menu ab_ctl\"><a class=\"GHDvEf ab_button\" href=\"#\" id=\"am-b104\" aria-label=\"Подробнее...\" aria-expanded=\"false\" aria-haspopup=\"true\" role=\"button\" jsaction=\"m.tdd;keydown:m.hbke;keypress:m.mskpe\" data-ved=\"0ahUKEwj2lM-vstDbAhXnwVkKHWzLAbg4ZBDsHQg4MAQ\"><span class=\"mn-dwn-arw\"></span></a><div class=\"action-menu-panel ab_dropdown\" role=\"menu\" tabindex=\"-1\" jsaction=\"keydown:m.hdke;mouseover:m.hdhne;mouseout:m.hdhue\" data-ved=\"0ahUKEwj2lM-vstDbAhXnwVkKHWzLAbg4ZBCpHwg5MAQ\"><ol><li class=\"action-menu-item ab_dropdownitem\" role=\"menuitem\"><a class=\"fl\" href=\"http://webcache.googleusercontent.com/search?q=cache:2RbAixGh8S4J:www.mediaalyans.by/reklama-v-metro/listovki-v-metro/+&amp;cd=105&amp;hl=ru&amp;ct=clnk&amp;gl=by\" ping=\"/url?sa=t&amp;source=web&amp;rct=j&amp;url=http://webcache.googleusercontent.com/search%3Fq%3Dcache:2RbAixGh8S4J:www.mediaalyans.by/reklama-v-metro/listovki-v-metro/%2B%26cd%3D105%26hl%3Dru%26ct%3Dclnk%26gl%3Dby&amp;ved=0ahUKEwj2lM-vstDbAhXnwVkKHWzLAbg4ZBAgCDowBA\" target=\"_blank\">Сохраненная&nbsp;копия</a></li></ol></div></div></div><span class=\"st\">Яркий плакат или сборная газета в метро – идеальный фокус внимания. Любители путешествий всегда отмечают непривычную стерильность&nbsp;...</span></div></div></div></div><!--n--></div><div class=\"g\"><!--m--><div data-hveid=\"59\" data-ved=\"0ahUKEwj2lM-vstDbAhXnwVkKHWzLAbg4ZBAVCDsoBTAF\"><div class=\"rc\"> <h3 class=\"r\"><a href=\"http://www.mediaalyans.by/xzy/f6brand-eco-co6949ho-10459-ym\" ping=\"/url?sa=t&amp;source=web&amp;rct=j&amp;url=http://www.mediaalyans.by/xzy/f6brand-eco-co6949ho-10459-ym&amp;ved=0ahUKEwj2lM-vstDbAhXnwVkKHWzLAbg4ZBAWCDwwBQ\" target=\"_blank\">【中古】【美品】BVLGARI ブルガリ B-zero1 リング k18WG XS #48 【新品 ...</a></h3><div class=\"s\"><div><div class=\"f hJND5c TbwUpd\" style=\"white-space:nowrap\"><cite class=\"iUh30\">www.mediaalyans.by/xzy/f6brand-eco-co6949ho-10459-ym</cite> - <a class=\"fl\" href=\"https://translate.google.com/translate?hl=ru&amp;sl=ja&amp;u=http://www.mediaalyans.by/xzy/f6brand-eco-co6949ho-10459-ym&amp;prev=search\" ping=\"/url?sa=t&amp;source=web&amp;rct=j&amp;url=https://translate.google.com/translate%3Fhl%3Dru%26sl%3Dja%26u%3Dhttp://www.mediaalyans.by/xzy/f6brand-eco-co6949ho-10459-ym%26prev%3Dsearch&amp;ved=0ahUKEwj2lM-vstDbAhXnwVkKHWzLAbg4ZBDuAQg-MAU\" target=\"_blank\">Перевести эту страницу</a></div><span class=\"st\"><span class=\"f\">16 дек. 2017 г. - </span>開催地. 大阪・東京. YouTuberに一斉に会えるのはU-FESだけ!大阪、東京にクリエイターが大集結!ライブやゲーム実況、 スペシャルコラボ企画など&nbsp;...</span></div></div></div></div><!--n--></div><div class=\"g\"><!--m--><div data-hveid=\"64\" data-ved=\"0ahUKEwj2lM-vstDbAhXnwVkKHWzLAbg4ZBAVCEAoBjAG\"><div class=\"rc\"> <h3 class=\"r\"><a href=\"http://sto.mediaalyans.by/uslugi-sto/diagnostika/kompyuternaya-diagnostika/\" ping=\"/url?sa=t&amp;source=web&amp;rct=j&amp;url=http://sto.mediaalyans.by/uslugi-sto/diagnostika/kompyuternaya-diagnostika/&amp;ved=0ahUKEwj2lM-vstDbAhXnwVkKHWzLAbg4ZBAWCEEwBg\" target=\"_blank\">Компьютерная диагностика - СТО &quot;Да-кар Сервис&quot;</a></h3><div class=\"s\"><div><div class=\"f hJND5c TbwUpd\" style=\"white-space:nowrap\"><cite class=\"iUh30\">sto.mediaalyans.by/uslugi-sto/diagnostika/kompyuternaya-diagnostika/</cite><div class=\"action-menu ab_ctl\"><a class=\"GHDvEf ab_button\" href=\"#\" id=\"am-b106\" aria-label=\"Подробнее...\" aria-expanded=\"false\" aria-haspopup=\"true\" role=\"button\" jsaction=\"m.tdd;keydown:m.hbke;keypress:m.mskpe\" data-ved=\"0ahUKEwj2lM-vstDbAhXnwVkKHWzLAbg4ZBDsHQhCMAY\"><span class=\"mn-dwn-arw\"></span></a><div class=\"action-menu-panel ab_dropdown\" role=\"menu\" tabindex=\"-1\" jsaction=\"keydown:m.hdke;mouseover:m.hdhne;mouseout:m.hdhue\" data-ved=\"0ahUKEwj2lM-vstDbAhXnwVkKHWzLAbg4ZBCpHwhDMAY\"><ol><li class=\"action-menu-item ab_dropdownitem\" role=\"menuitem\"><a class=\"fl\" href=\"http://webcache.googleusercontent.com/search?q=cache:8DNt2vrxvDYJ:sto.mediaalyans.by/uslugi-sto/diagnostika/kompyuternaya-diagnostika/+&amp;cd=107&amp;hl=ru&amp;ct=clnk&amp;gl=by\" ping=\"/url?sa=t&amp;source=web&amp;rct=j&amp;url=http://webcache.googleusercontent.com/search%3Fq%3Dcache:8DNt2vrxvDYJ:sto.mediaalyans.by/uslugi-sto/diagnostika/kompyuternaya-diagnostika/%2B%26cd%3D107%26hl%3Dru%26ct%3Dclnk%26gl%3Dby&amp;ved=0ahUKEwj2lM-vstDbAhXnwVkKHWzLAbg4ZBAgCEQwBg\" target=\"_blank\">Сохраненная&nbsp;копия</a></li></ol></div></div></div><span class=\"st\">Компьютерная диагностика Лучшая станция технического обслуживания автомобилей в Минске.</span></div></div></div></div><!--n--></div><div class=\"g\"><!--m--><div data-hveid=\"69\" data-ved=\"0ahUKEwj2lM-vstDbAhXnwVkKHWzLAbg4ZBAVCEUoBzAH\"><div class=\"rc\"> <h3 class=\"r\"><a href=\"http://www.mediaalyans.by/xzy/ddii-sakurae776panasonic-light2017-5722-f\" ping=\"/url?sa=t&amp;source=web&amp;rct=j&amp;url=http://www.mediaalyans.by/xzy/ddii-sakurae776panasonic-light2017-5722-f&amp;ved=0ahUKEwj2lM-vstDbAhXnwVkKHWzLAbg4ZBAWCEYwBw\" target=\"_blank\">βパナソニック 照明器具【YYY36936LE1】LEDスポット1100タイプ取付自在</a></h3><div class=\"s\"><div><div class=\"f hJND5c TbwUpd\" style=\"white-space:nowrap\"><cite class=\"iUh30\">www.mediaalyans.by/.../ddii-sakurae776panasonic-light2017...</cite> - <a class=\"fl\" href=\"https://translate.google.com/translate?hl=ru&amp;sl=ja&amp;u=http://www.mediaalyans.by/xzy/ddii-sakurae776panasonic-light2017-5722-f&amp;prev=search\" ping=\"/url?sa=t&amp;source=web&amp;rct=j&amp;url=https://translate.google.com/translate%3Fhl%3Dru%26sl%3Dja%26u%3Dhttp://www.mediaalyans.by/xzy/ddii-sakurae776panasonic-light2017-5722-f%26prev%3Dsearch&amp;ved=0ahUKEwj2lM-vstDbAhXnwVkKHWzLAbg4ZBDuAQhIMAc\" target=\"_blank\">Перевести эту страницу</a></div><span class=\"st\"><span class=\"f\">15 дек. 2017 г. - </span>2017-12-15 - YYY36936LE1。βパナソニック 照明器具【YYY36936LE1】LED<wbr>スポット1100タイプ取付自在 {S}</span></div></div></div></div><!--n--></div><div class=\"g\"><!--m--><div data-hveid=\"74\" data-ved=\"0ahUKEwj2lM-vstDbAhXnwVkKHWzLAbg4ZBAVCEooCDAI\"><div class=\"rc\"> <h3 class=\"r\"><a href=\"http://www.mediaalyans.by/nteo/dezerocustom3cb2b5-g244-53-008-000027\" ping=\"/url?sa=t&amp;source=web&amp;rct=j&amp;url=http://www.mediaalyans.by/nteo/dezerocustom3cb2b5-g244-53-008-000027&amp;ved=0ahUKEwj2lM-vstDbAhXnwVkKHWzLAbg4ZBAWCEswCA\" target=\"_blank\">NMAX(エヌマックス)SE86J/2BJ-SED6J R-EVO(レーシングエヴォ ...</a></h3><div class=\"s\"><div><div class=\"f hJND5c TbwUpd\" style=\"white-space:nowrap\"><cite class=\"iUh30\">www.mediaalyans.by/.../dezerocustom3cb2b5-g244-53-008-...</cite> - <a class=\"fl\" href=\"https://translate.google.com/translate?hl=ru&amp;sl=ja&amp;u=http://www.mediaalyans.by/nteo/dezerocustom3cb2b5-g244-53-008-000027&amp;prev=search\" ping=\"/url?sa=t&amp;source=web&amp;rct=j&amp;url=https://translate.google.com/translate%3Fhl%3Dru%26sl%3Dja%26u%3Dhttp://www.mediaalyans.by/nteo/dezerocustom3cb2b5-g244-53-008-000027%26prev%3Dsearch&amp;ved=0ahUKEwj2lM-vstDbAhXnwVkKHWzLAbg4ZBDuAQhNMAg\" target=\"_blank\">Перевести эту страницу</a></div><span class=\"st\">2017-12-16 - 【送料無料】。NMAX(エヌマックス)SE86J/2BJ-SED6J R-EVO(<wbr>レーシングエヴォ)マフラーSP ステンレスサイレンサー 政府認証モデル BEAMS(<wbr>ビームス)</span></div></div></div></div><!--n--></div></div></div></div></div><!--z--></div></div></div><div id=\"bottomads\"></div><div class=\"med\" id=\"extrares\"><div id=\"botstuff\"><style>.mfr{margin-top:1em;margin-bottom:1em}</style><div data-ved=\"0ahUKEwj2lM-vstDbAhXnwVkKHWzLAbg4ZBAICE4\"><div id=\"bres\"></div><div style=\"display:none\" jsl=\"$t t-orNZyHXTT74;$x 0;\" class=\"r-iGFXyu3M5gB4\"></div><div jscontroller=\"WgDvvc\" jsdata=\"hE2vdf;;AU/AvE\" jsaction=\"rcuQ6b:npT2md\"></div></div></div></div><div><div id=\"foot\" role=\"navigation\"><div id=\"cljs\"></div><span id=\"xjs\"><div id=\"navcnt\"><table style=\"border-collapse:collapse;text-align:left;margin:30px auto 30px\" id=\"nav\" role=\"presentation\"><tr valign=\"top\"><td class=\"b navend\"><a class=\"pn\" href=\"/search?q=site:mediaalyans.by&amp;num=100&amp;newwindow=1&amp;biw=1920&amp;bih=974&amp;ei=2OwgW_bIA-eD5wLslofACw&amp;start=0&amp;sa=N&amp;filter=0\" id=\"pnprev\"><span class=\"csb ch\" style=\"background:url(/images/nav_logo242.png) no-repeat;background-position:0 0;width:53px;float:right\"></span><span style=\"display:block;margin-right:35px;clear:right\">Предыдущая</span></a></td><td><a aria-label=\"Page 1\" class=\"fl\" href=\"/search?q=site:mediaalyans.by&amp;num=100&amp;newwindow=1&amp;biw=1920&amp;bih=974&amp;ei=2OwgW_bIA-eD5wLslofACw&amp;start=0&amp;sa=N&amp;filter=0\"><span class=\"csb ch\" style=\"background:url(/images/nav_logo242.png) no-repeat;background-position:-74px 0;width:20px\"></span>1</a></td><td class=\"cur\"><span class=\"csb\" style=\"background:url(/images/nav_logo242.png) no-repeat;background-position:-53px 0;width:20px\"></span>2</td><td class=\"b navend\"><span class=\"csb\" style=\"background:url(/images/nav_logo242.png) no-repeat;background-position:-96px 0;width:45px\"></span></td></tr></table></div></span><div id=\"gfn\"><style>#foot{visibility:inherit}</style></div><span id=\"fvf\"></span></div></div></div></div><div class=\"col\" id=\"rhscol\"><div id=\"rhs\"><div id=\"rhs_block\" jsl=\"$t t-5RRekjfu2Ys;$x 0;\" class=\"r-imkWqZ9Sh6po\"><script nonce=\"c8loNlRhIkx3UeDLrR1hHw==\">(function(){var c4=1188;var c5=1276;try{var w=document.body.offsetWidth,n=3;if(w>=c4)n=w<c5?4:5;document.getElementById('rhs_block').className+=' rhstc'+n;}catch(e){}"; // result will be an iterator over tuples containing the start and end indices for each match in the string let result = regex.captures_iter(string); for mat in result { println!("{:?}", mat); } }

Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for Rust, please visit: https://docs.rs/regex/latest/regex/