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

/
/
gsuU

Test String

Code Generator

Generated Code

import java.util.regex.Matcher; import java.util.regex.Pattern; public class Example { public static void main(String[] args) { final String regex = "<div class=\"details-param-name\">Артикул:<\\/div>\\s*<div class=\"details-param-value inplace-offset\"\\s*data-ng-bind=\"product\\.offerSelected\\.ArtNo\"\\s*data-ng-init=\"product\\.offerSelected\\.ArtNo = '(?'SKU'.+)'\">\\s*<\\/div>.*<span class=\"price\">\\s*<span data-ng-if=\"product\\.Price\\.PriceString == null\">\\s*<div class=\"price-current cs-t-1\">\\s*<div class=\"price-number\">\\s*(?'PRICE'[\\d ]+)<\\/div>\\s*<div class=\"price-currency\"> руб\\.<\\/div>\\s*<\\/div>\\s*<\\/span>\\s*<span data-ng-bind-html=\"product\\.Price\\.PriceString\">\\s*<\\/span>\\s*<\\/span>"; final String string = "<!DOCTYPE html>\n" + "<html data-ng-app=\"app\" data-ng-controller=\"ProductCtrl as product\">\n" + "<head>\n" + " <title>&quot;Времена года&quot; игрушка- перевертыш развивающая Моя Зая 4в1 | Купить недорого в Москве | Оптом дешевле</title>\n" + " <link rel=\"canonical\" href=\"https://davaydarit.ru/products/vremena-goda-igrushka-perevertysh-razvivaiuschaya-moya-zaya-4v1\" />\n" + " <base href=\"https://davaydarit.ru/\" />\n" + " <meta charset=\"utf-8\">\n" + " <meta content=\"Dynamic\" name=\"document-state\">\n" + " <meta name=\"msapplication-tap-highlight\" content=\"no\" />\n" + " <meta content=\"width=device-width,initial-scale=1,user-scalable=no\" name=\"viewport\">\n" + " <meta name=\"Description\" content=\"Мягкие детские игрушки &quot;Времена года&quot; игрушка- перевертыш развивающая Моя Зая 4в1 низкая цена ✔большой выбор✔быстрая доставка✔можно заказать ☎ 8 (800) 775-70-47 Отзывы ✮✮✮✮✮\" />\n" + " <meta name=\"Keywords\" content=\"\" />\n" + " <link rel=\"SHORTCUT ICON\" href=\"https://davaydarit.ru/pictures/favicon_20160731175015.png\" />\n\n" + " \n\n\n\n" + "<style>.ng-cloak, .x-ng-cloak, .ng-hide:not(.ng-hide-animate) {display: none !important;}form {display: block;}#header,#layout,body{position:relative}.carousel-dots,.menu{list-style:none}*{box-sizing:border-box}html{font-family:sans-serif;font-size:16px}html *{max-height:999999px}body{margin:0;color:#3a3c44;font-family:Tahoma,'Helvetica Neue',Helvetica,Geneva,Arial,sans-serif;padding:0;transition:left .1s;font-size:13px;line-height:1.5}article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}#header{height:50px}.nav-root,.searchBtn,.toggle-sidebar-icon,.toggle_sidebar{position:absolute;top:0}.center-aligner{text-align:center;display:flex;-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center}.nav-root,.page-title{font-weight:700;font-size:1.06667em;text-align:center;padding:0}.nav-root{text-align:center;padding:0;bottom:0;right:100px;left:100px;margin:auto}.toggle_sidebar{height:50px;width:50px;cursor:pointer;left:0}.toggle-sidebar-icon{font-size:1em;font-weight:400;width:15px;height:15px;left:0;right:0;bottom:0;margin:auto}.searchBtn{height:50px;width:50px;left:50px}.inked{position:relative;overflow:hidden}.searchBtn.inked{position:absolute}a{color:#4b4f58;background:0 0;text-decoration:none;-webkit-tap-highlight-color:transparent}.searchBtn .search-link{box-sizing:content-box;position:absolute;height:16px;width:16px;margin:auto;padding:15px;font-size:1.06667em;top:0;right:0;left:0;bottom:0;text-decoration:none}.search-panel{position:absolute;top:50px;width:100%;height:50px;z-index:2;padding:5px;box-sizing:border-box}.ng-cloak,.ng-hide:not(.ng-hide-animate),.x-ng-cloak,[data-ng-cloak],[ng-cloak],[ng:cloak],[x-ng-cloak]{display:none!important}button,input,optgroup,select,textarea{color:inherit;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;font-size:inherit;line-height:inherit;font-family:inherit;margin:0}input{line-height:normal}input[type=search],input[type=text],input[type=password],input[type=email],input[type=number],input[type=tel],input[type=url],textarea{box-sizing:border-box;border-radius:5px;border:1px solid #e2e3e4;vertical-align:middle;width:100%;-webkit-appearance:none;box-shadow:none}.search-panel .search-input{border-radius:0;height:100%;text-indent:10px}.search-panel .search-disable{position:absolute;right:5px;top:5px;width:40px;height:40px;display:inline-block}.search-panel .search-disable .search-disable-i{position:absolute;display:inline-block;top:0;left:0;right:0;bottom:0;margin:auto;text-align:center;line-height:40px;font-size:30px}.cartBtn .cart-link,.phoneBtn .phone-link{margin:auto;border-radius:50%;font-size:1.06667em;left:0;bottom:0}.phoneBtn{position:absolute;height:50px;width:50px;right:60px;top:0}.cartBtn,.cartBtn .cart-link,.phoneBtn .phone-link{position:absolute;right:0;top:0}.link-text-decoration-invert{text-decoration:underline}.cartBtn .cart-link,.link-text-decoration-none,.phoneBtn .phone-link{text-decoration:none}.phoneBtn .phone-link{box-sizing:content-box;height:16px;width:16px;padding:15px}.carousel,.catalog-select-placeholder,.logo-search-pnl{box-sizing:border-box}.cartBtn{height:50px;width:60px}.cartBtn .cart-link{height:1.46667em;width:4em}.cartBtn .cart-count{position:relative;border-width:1px;border-style:solid;padding:.13333em .33333em;display:inline-block;font-family:Arial;border-radius:2px}.cartBtn .cart-count .border{content:\"\";position:absolute;left:-3px;top:0;bottom:0;margin:auto 0;width:3px;height:3px;border-width:1px 0 0 1px;border-style:solid;transform:rotate(-45deg)}.carousel,.carousel-list{transform:translate3d(0,0,0)}.panel{padding:.66667em 1.33333em;display:block;border-width:1px 0 0;border-style:solid;position:relative}.logo-search-pnl{display:table;width:100%}img,img:not([height]),img:not([width]){height:auto;width:auto;max-height:100%;max-width:100%}.panel.no-borders{border:none}.logo-search-pnl .logo-cell,.logo-search-pnl .search-cell{display:table-cell;vertical-align:middle}.logo-search-pnl .logo-cell{text-align:center;font-size:0;line-height:0}img{border:0}.logo-search-pnl .search-cell{padding-left:1.66667em}.link-dashed,.link-dashed-invert{text-decoration:none;border-bottom-style:dashed;border-bottom-width:1px}.link-dashed,.link-dotted{border-bottom-color:transparent}.catalog-select-placeholder div{width:48%;display:inline-block}.catalog-select-placeholder .catalog-select-placeholder{padding-right:1%;float:left}.select-custom{position:relative;display:inline-block;width:100%;color:#fff}button,select{text-transform:none}.select-custom select{-webkit-appearance:none;border:none;padding:.5rem 1.875rem .5rem .9375rem;border-radius:.3125rem;width:100%}.select-custom--fat select{padding-top:12px;padding-bottom:12px}.select-custom select option{color:#333;border:none;background-color:#fff}.catalog-select-placeholder .catalog-search-placeholder{padding-left:1%;float:right;position:relative}.catalog-search-btn,.catalog-search-btn span{position:absolute;display:inline-block;top:0;bottom:0}.input-big{font-size:1rem;padding:.8125rem}.catalog-search-btn{width:2.6em;height:2.6em;right:.33333em;border-radius:.33333em;margin:auto 0}.catalog-search-btn span{width:1.06667em;height:1.26667em;margin:auto;right:0;left:0}.carousel{position:relative}.carousel-mobile{padding:0}.carousel-inner{overflow:hidden;position:relative}.carousel-main-list{white-space:nowrap;display:block}.carousel-list{white-space:nowrap;font-size:0;line-height:0;transition-property:transform}.carousel-main-item{display:inline-block;visibility:hidden;position:relative;line-height:0;font-size:0;text-align:center;vertical-align:middle;width:100%}.carousel-main-item:first-child{visibility:visible}.carousel-initilized .carousel-main-item{display:inline-block;visibility:visible}.carousel-main-item img{border-radius:.3125rem}button{overflow:visible}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}.carousel-main-next,.carousel-main-prev{color:rgba(0,0,0,.498039);font-size:1.375rem}.carousel-main-prev{margin-left:.3125rem}.carousel-nav-next,.carousel-nav-prev{position:absolute;text-align:center;padding:0;margin:0;border:0;background:none;font-size:2.13333em}button[disabled],html input[disabled]{cursor:default}.carousel-nav-next:disabled,.carousel-nav-prev:disabled{display:none}.carousel-horizontal .carousel-nav-prev{top:50%;transform:translateY(-50%);left:0}.carousel-horizontal .carousel-nav-inside .carousel-nav-prev{left:0}.carousel-main-next{margin-right:.3125rem}.carousel-horizontal .carousel-nav-next{top:50%;transform:translateY(-50%);right:0}.carousel-horizontal .carousel-nav-inside .carousel-nav-next{right:0}.carousel-mobile-dots{margin-bottom:6px!important}.carousel-dots{padding:0;margin:10px 0 0;display:block;text-align:center}.carousel-dots-item,.price,.prod-photo,.prod-text{display:inline-block}.carousel-dots-item{vertical-align:middle;cursor:pointer;padding:.3125rem;font-size:0;line-height:0;opacity:.5}.carousel-dots-selected{opacity:1}.carousel-dots-item-inner{border-radius:50%;height:.5rem;width:.5rem;display:inline-block;box-shadow:rgba(0,0,0,.498039) 0 0 2px 0}.panel.header{font-size:1.26667em}.panel.header .panel-add-link{font-size:.625em;line-height:2.25em;float:right}#sidebar .head,.menu a span,.price,.prod-name{font-size:1.2em}.prod-photo{width:40%;vertical-align:middle;margin:0 4% 0 0;text-align:center}.prod-text{width:54%;vertical-align:middle}.price{font-weight:700;margin-top:.33333em;line-height:1}.price-current,.price-discount,.price-new,.price-old{display:block}.panel .panel-arrow,.price-currency,.price-discount-abs,.price-discount-percent,.price-number{display:inline-block}.panel .panel-arrow{top:0;bottom:0;margin:auto 0;height:19px;width:12px;position:absolute}#sidebar,#sidebar_overlay{position:fixed;top:0;bottom:0}.panel .panel-arrow.ar-r{right:15px}#sidebar_overlay{left:0;right:0;display:none;z-index:100;background:rgba(0,0,0,.2)}#sidebar{z-index:110;left:-85%;width:85%;transition:left .1s;overflow-x:hidden;overflow-y:auto;background:#3a3c44}#sidebar .head{padding:0 12px;line-height:2.66667em;display:block;background:#232429}#sidebar .head img{display:inline-block;vertical-align:middle;width:20px;border-radius:4px}#sidebar .head .username{max-width:190px;display:inline-block;vertical-align:middle;margin-left:15px;color:#fff;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.city-selector-input input[type=text]{border:none;text-indent:.66667em;padding:.33333em 0 .06667em}.city-selector-panel{border-width:1px;border-style:solid;border-radius:5px;overflow-y:scroll}.menu a{padding:0 24px;display:block;border-bottom-width:1px;border-bottom-style:solid;text-align:left;line-height:3.2em;color:#fff;border-color:#717171;overflow:hidden;position:relative}[hidden],template{display:none}</style>\n\n" + "<script type=\"text/javascript\" src=\"/combine/mobiletop.js?72E936237FD8162DD4E0B9E4EF619B21\"></script>\n\n" + "<link href=\"modules/shoppingcartpopup/styles/cartpopup.css\" rel=\"stylesheet\">\n" + "<script>\n" + " (function(d) {\n" + " var ref = d.getElementsByTagName('script')[0]; var js, jsId = 'az-kil';\n" + " if (d.getElementById(jsId)) return; \n" + " js = d.createElement('script'); js.id = jsId; js.async = true;\n" + " js.src = '//apps.azhelp.ru/advshop?d='+escape(window.location.href)+'&b='+escape(window.navigator.userAgent);\n" + " ref.parentNode.insertBefore(js, ref);\n" + " } (document));\n" + " </script> \n" + "</head>\n" + " <body class=\"cs-t-1\" data-ng-controller=\"sidebarCtrl as sbCtrl\" data-ng-class=\"{'sidebar_open' : sbCtrl.sidebarVisible.visible }\">\n" + " \n" + " \n" + " <div style=\"display:none\">\n" + "<script type=\"text/javascript\">\n" + "var google_tag_params = {\n" + "ecomm_prodid: '18563',\n" + "ecomm_pagetype: 'product',\n" + "ecomm_totalvalue: 1390\n" + "};\n" + "</script>\n" + "<script type =\"text/javascript\">\n" + "/* <![CDATA[ */\n" + "var google_conversion_id = 866969110;\n" + " var google_custom_params = window.google_tag_params;\n" + " var google_remarketing_only = true;\n" + "/* ]]> */\n" + "</script>\n" + "<script type =\"text/javascript\" src=\"//www.googleadservices.com/pagead/conversion.js\">\n" + "</script>\n" + "<noscript>\n" + "<div style =\"display:inline;\">\n" + "<img height =\"1\" width=\"1\" style=\"border-style:none;\" alt=\"\" src=\"//googleads.g.doubleclick.net/pagead/viewthroughconversion/866969110/?value=0&amp;guid=ON&amp;script=0\"/>\n" + "</div>\n" + "</noscript>\n" + "</div><div style='display:none !important;'><!-- Yandex.Metrika informer -->\n" + "<a href=\"https://metrika.yandex.ru/stat/?id=30256249&amp;from=informer\"\n" + "target=\"_blank\" rel=\"nofollow\"><img src=\"https://informer.yandex.ru/informer/30256249/3_1_FFFFFFFF_EFEFEFFF_0_pageviews\"\n" + "style=\"width:88px; height:31px; border:0;\" alt=\"Яндекс.Метрика\" title=\"Яндекс.Метрика: данные за сегодня (просмотры, визиты и уникальные посетители)\" class=\"ym-advanced-informer\" data-cid=\"30256249\" data-lang=\"ru\" /></a>\n" + "<!-- /Yandex.Metrika informer -->\n\n" + "<!-- Yandex.Metrika counter -->\n" + "<script type=\"text/javascript\">\n" + " (function (d, w, c) {\n" + " (w[c] = w[c] || []).push(function() {\n" + " try {\n" + " w.yaCounter30256249 = new Ya.Metrika({\n" + " id:30256249,\n" + " clickmap:true,\n" + " trackLinks:true,\n" + " accurateTrackBounce:true,\n" + " webvisor:true,\n" + " trackHash:true\n" + " });\n" + " } catch(e) { }\n" + " });\n\n" + " var n = d.getElementsByTagName(\"script\")[0],\n" + " s = d.createElement(\"script\"),\n" + " f = function () { n.parentNode.insertBefore(s, n); };\n" + " s.type = \"text/javascript\";\n" + " s.async = true;\n" + " s.src = \"https://mc.yandex.ru/metrika/watch.js\";\n\n" + " if (w.opera == \"[object Opera]\") {\n" + " d.addEventListener(\"DOMContentLoaded\", f, false);\n" + " } else { f(); }\n" + " })(document, window, \"yandex_metrika_callbacks\");\n" + "</script>\n" + "<!-- /Yandex.Metrika counter --></div><script type=\"text/javascript\" src=\"modules/yametrika/js/tracking.js?v=2\" async></script> <div class=\"yacounterid\" data-counterId=\"30256249\"></div>\n" + " <div id=\"layout\">\n" + " \n\n" + "<header id=\"header\" class=\"cs-bg-1\">\n" + " <div class=\"nav-root cs-t-8 center-aligner\">Каталог</div>\n" + " <div data-ng-controller=\"sidebarCtrl as sbCtrl\" data-ng-click=\"sbCtrl.toggleSidebar()\" class=\"toggle_sidebar\" id=\"sidebar_trigger\">\n" + " <div class=\"toggle-sidebar-icon icon-menu-before icon-margin-drop cs-t-8\"></div>\n" + " </div>\n" + " <div data-window-click=\"spCtrl.clickOut(event)\">\n" + " <div data-search-icon class=\"js-click-out\"></div>\n" + " <div data-search-panel class=\"js-click-out\"></div>\n" + " </div>\n" + " <div class=\"phoneBtn\" data-ng-controller=\"CitySelectorCtrl as csCtrl\">\n" + " <a class=\"phone-link link-text-decoration-invert icon-phone-before icon-margin-drop inked ink-light cs-t-8\"\n" + " data-ng-hide=\"!zone.MobilePhone || zone.MobilePhone.length === 0\" \n" + " data-zone-current \n" + " data-start-val=\"{MobilePhone: '8-800-77-57-047'}\" \n" + " data-ng-href=\"tel:{{zone.MobilePhone}}\" \n" + " href=\"tel:8-800-77-57-047\"></a>\n" + " </div>\n" + " <div class=\"cartBtn\">\n" + " <a href=\"https://davaydarit.ru/cart\" class=\"cart-link cs-l-7\">\n" + " <span class=\"icon-bag-before\"></span>\n" + " <span class=\"cart-count cs-br-3\">\n" + " <span class=\"border cs-bg-1 cs-br-3\"></span>\n" + " <span data-cart-count>0</span>\n" + " </span>\n" + " </a>\n" + " </div>\n" + "</header>\n" + " \n" + "<div data-ng-init=\"product.loadData(4579, null, null)\"></div>\n" + "<div id=\"content\">\n\n" + " <a href=\"https://davaydarit.ru/categories/moya-zaya\" class=\"panel no-borders back-link cs-bg-3 cs-l-1\">\n" + " Моя Зая\n" + " <div class=\"panel-arrow ar-l icon-left-open-before cs-l-1\"></div>\n" + " </a>\n" + " <div class=\"panel no-borders main-product-cell\">\n" + " <h1 class=\"product-title-mobile page-title\" itemprop=\"name\">\"Времена года\" игрушка- перевертыш развивающая Моя Зая 4в1</h1>\n\n" + " \n" + " <div class=\"gallery-photos-mobile details-carousel details-carousel-mobile\" data-ng-class=\"{'details-carousel' : product.carouselHidden}\" data-ng-init=\"product.carouselExist = true\">\n" + " <div class=\"gallery-photos-slider-list-horizontal\"\n" + " data-ng-init=\"product.addControlToQueue('carousel')\"\n" + " data-carousel\n" + " data-carousel-class=\"gallery-photos-slider\"\n" + " data-visible-max=\"1\"\n" + " data-init-fn=\"product.addCarousel(carousel)\"\n" + " data-item-select=\"product.carouselItemSelect(carousel, item, index)\"\n" + " data-item-select-class=\"details-carousel-selected\"\n" + " data-stretch=\"true\">\n" + " <div class=\"details-carousel-item\" data-parameters=\"{'colorId':27 ,'main':true ,'previewPath':'https://davaydarit.ru/pictures/product/middle/12492_middle.jpg' ,'originalPath':'https://davaydarit.ru/pictures/product/big/12492_big.jpg','title':'Времена года. Моя зая. Игрушка развивающая', 'PhotoId': 12492 }\">\n" + " <figure class=\"gallery-photos-item\" style=\"max-width: 200px\">\n" + " <img class=\"gallery-photos-item-obj img-not-resize\" src=\"https://davaydarit.ru/pictures/product/middle/12492_middle.jpg\" alt=\"Времена года. Моя зая. Игрушка развивающая\" title=\"Времена года. Моя зая. Игрушка развивающая\" />\n" + " </figure>\n" + " </div>\n" + " <div class=\"details-carousel-item\" data-parameters=\"{'colorId':27 ,'main':false ,'previewPath':'https://davaydarit.ru/pictures/product/middle/12493_middle.jpg' ,'originalPath':'https://davaydarit.ru/pictures/product/big/12493_big.jpg','title':'Времена года. Моя зая. Игрушка развивающая', 'PhotoId': 12493 }\">\n" + " <figure class=\"gallery-photos-item\" style=\"max-width: 200px\">\n" + " <img class=\"gallery-photos-item-obj img-not-resize\" src=\"https://davaydarit.ru/pictures/product/middle/12493_middle.jpg\" alt=\"Времена года. Моя зая. Игрушка развивающая\" title=\"Времена года. Моя зая. Игрушка развивающая\" />\n" + " </figure>\n" + " </div>\n" + " <div class=\"details-carousel-item\" data-parameters=\"{'colorId':27 ,'main':false ,'previewPath':'https://davaydarit.ru/pictures/product/middle/12494_middle.jpg' ,'originalPath':'https://davaydarit.ru/pictures/product/big/12494_big.jpg','title':'Времена года. Моя зая. Игрушка развивающая', 'PhotoId': 12494 }\">\n" + " <figure class=\"gallery-photos-item\" style=\"max-width: 200px\">\n" + " <img class=\"gallery-photos-item-obj img-not-resize\" src=\"https://davaydarit.ru/pictures/product/middle/12494_middle.jpg\" alt=\"Времена года. Моя зая. Игрушка развивающая\" title=\"Времена года. Моя зая. Игрушка развивающая\" />\n" + " </figure>\n" + " </div>\n" + " <div class=\"details-carousel-item\" data-parameters=\"{'colorId':27 ,'main':false ,'previewPath':'https://davaydarit.ru/pictures/product/middle/12495_middle.jpg' ,'originalPath':'https://davaydarit.ru/pictures/product/big/12495_big.jpg','title':'Времена года. Моя зая. Игрушка развивающая', 'PhotoId': 12495 }\">\n" + " <figure class=\"gallery-photos-item\" style=\"max-width: 200px\">\n" + " <img class=\"gallery-photos-item-obj img-not-resize\" src=\"https://davaydarit.ru/pictures/product/middle/12495_middle.jpg\" alt=\"Времена года. Моя зая. Игрушка развивающая\" title=\"Времена года. Моя зая. Игрушка развивающая\" />\n" + " </figure>\n" + " </div>\n" + " <div class=\"details-carousel-item\" data-parameters=\"{'colorId':27 ,'main':false ,'previewPath':'https://davaydarit.ru/pictures/product/middle/12505_middle.jpg' ,'originalPath':'https://davaydarit.ru/pictures/product/big/12505_big.jpg','title':'Времена года. Моя зая. Игрушка развивающая', 'PhotoId': 12505 }\">\n" + " <figure class=\"gallery-photos-item\" style=\"max-width: 200px\">\n" + " <img class=\"gallery-photos-item-obj img-not-resize\" src=\"https://davaydarit.ru/pictures/product/middle/12505_middle.jpg\" alt=\"Времена года. Моя зая. Игрушка развивающая\" title=\"Времена года. Моя зая. Игрушка развивающая\" />\n" + " </figure>\n" + " </div>\n" + " <div class=\"details-carousel-item\" data-parameters=\"{'colorId':27 ,'main':false ,'previewPath':'https://davaydarit.ru/pictures/product/middle/12490_middle.jpg' ,'originalPath':'https://davaydarit.ru/pictures/product/big/12490_big.jpg','title':'Времена года. Моя зая. Игрушка развивающая', 'PhotoId': 12490 }\">\n" + " <figure class=\"gallery-photos-item\" style=\"max-width: 200px\">\n" + " <img class=\"gallery-photos-item-obj img-not-resize\" src=\"https://davaydarit.ru/pictures/product/middle/12490_middle.jpg\" alt=\"Времена года. Моя зая. Игрушка развивающая\" title=\"Времена года. Моя зая. Игрушка развивающая\" />\n" + " </figure>\n" + " </div>\n" + " <div class=\"details-carousel-item\" data-parameters=\"{'colorId':27 ,'main':false ,'previewPath':'https://davaydarit.ru/pictures/product/middle/12491_middle.jpg' ,'originalPath':'https://davaydarit.ru/pictures/product/big/12491_big.jpg','title':'Времена года. Моя зая. Игрушка развивающая', 'PhotoId': 12491 }\">\n" + " <figure class=\"gallery-photos-item\" style=\"max-width: 200px\">\n" + " <img class=\"gallery-photos-item-obj img-not-resize\" src=\"https://davaydarit.ru/pictures/product/middle/12491_middle.jpg\" alt=\"Времена года. Моя зая. Игрушка развивающая\" title=\"Времена года. Моя зая. Игрушка развивающая\" />\n" + " </figure>\n" + " </div>\n" + " </div>\n" + " </div>\n" + " <span class=\"gallery-picture-labels\"></span>\n\n\n" + " <div class=\"bi-time\">\n" + " \n" + " </div>\n" + " <div class=\"details-row details-availability\" data-ng-init=\"product.offerSelected.IsAvailable = true;\">\n" + " <div class=\"availability available\"\n" + " data-ng-class=\"{'available': product.offerSelected.IsAvailable === true, 'not-available' : product.offerSelected.IsAvailable === false}\">\n" + " <div data-ng-bind-html=\"product.offerSelected.Available\"></div>\n" + " <div data-ng-if=\"product.offerSelected.Available == null\">Есть в наличии</div>\n" + " </div>\n" + " </div>\n" + " <div class=\"details-row details-sku\">\n" + " <div class=\"details-param-name\">Артикул:</div>\n" + " <div class=\"details-param-value inplace-offset\"\n" + " data-ng-bind=\"product.offerSelected.ArtNo\"\n" + " data-ng-init=\"product.offerSelected.ArtNo = 'И-001-1'\">\n" + " </div>\n" + " </div>\n" + " <div class=\"details-row details-colors\" data-ng-init=\"product.colorsExist = true\">\n" + " <div class=\"color-viewer-header\">\n" + " Цвет\n" + " </div>\n" + "<div class=\"color-viewer-list js-color-viewer-slider\"\n" + " data-colors-viewer\n" + " data-color-selected=\"product.colorSelected\"\n" + " data-init-colors=\"product.initColors(colorsViewer)\"\n" + " data-change-color=\"product.changeColor(color)\"\n" + " data-colors=\"::[{&quot;ColorId&quot;:27,&quot;ColorName&quot;:&quot;Мультиколор&quot;,&quot;ColorCode&quot;:&quot;#ffffff&quot;,&quot;PhotoName&quot;:&quot;4771.jpg&quot;}]\"\n" + " data-start-selected-colors=\"\"\n" + " data-color-width=\"::'18px'\"\n" + " data-color-height=\"::'18px'\"\n" + " data-multiselect=\"false\"\n" + " data-image-type=\"Details\"></div>\n\n" + " </div>\n" + " <div class=\"details-row details-sizes\" data-ng-init=\"product.sizesExist = true\">\n" + " <div class=\"sizes-viewer-list text-static\">\n" + " <div class=\"sizes-viewer-header\">\n" + " Размер\n" + " </div>\n" + " <div data-sizes-viewer\n" + " data-sizes=\"[{&quot;SizeId&quot;:63,&quot;SizeName&quot;:&quot;40 см&quot;}]\"\n" + " data-size-selected=\"product.sizeSelected\"\n" + " data-init-sizes=\"product.initSizes(sizesViewer)\"\n" + " data-change-size=\"product.changeSize(size)\"></div>\n" + "</div>\n\n" + " </div>\n" + " <div class=\"details-row details-custom-options\">\n" + " <div data-custom-options data-product-id=\"4579\" data-init-fn=\"product.customOptionsInitFn(customOptions)\" data-change-fn=\"product.customOptionsChange(item)\"></div>\n" + " </div>\n" + " <div class=\"row product-price details-payment\" itemprop=\"offers\" itemscope itemtype=\"http://schema.org/Offer\">\n" + " <div class=\"half-cell l middle\">\n" + " <div class=\"details-payment-cell\" data-ng-init=\"product.discount=0; product.Price.PriceNumber=1390;\">\n" + " <span class=\"price\">\n" + " <span data-ng-if=\"product.Price.PriceString == null\"><div class=\"price-current cs-t-1\"><div class=\"price-number\"> 1 390</div> <div class=\"price-currency\"> руб.</div></div></span>\n" + " <span data-ng-bind-html=\"product.Price.PriceString\"></span>\n" + " </span>\n" + " \n" + " \n" + " <span class=\"bonus-string-sum\" data-ng-if=\"product.Price.Bonuses == null\">+ 41,7 руб. на бонусную карту</span>\n" + " <span class=\"bonus-string-sum\" data-ng-bind-html=\"product.Price.Bonuses\"></span>\n" + " </div>\n" + " </div>\n" + " <div class=\"half-cell r middle\">\n" + " <div class=\"details-payment-cell\">\n" + " <div class=\"details-payment-item details-payment-inline \"\n" + " data-ng-class=\"{'ng-hide': product.dirty === false ? false : product.offerSelected.Amount === 0 || product.Price.PriceNumber === 0}\">\n" + " <a href=\"https://davaydarit.ru/cart\"\n" + " class=\"btn btn-middle btn-confirm icon-bag-before\"\n" + " data-cart-add\n" + " data-cart-add-valid=\"product.validate()\"\n" + " data-offer-id=\"product.offerSelected.OfferId\"\n" + " data-product-id=\"4579\"\n" + " data-amount=\"product.offerSelected.AmountBuy\"\n" + " data-attributes-xml=\"product.customOptions.xml\">В корзину</a>\n" + " </div>\n" + " </div>\n" + " </div>\n" + " </div>\n\n" + " <div class=\"block-exuding-row cs-bg-4\" data-ng-controller=\"CitySelectorCtrl as csCtrl\">\n" + " <div class=\"top-shipping-row\">\n" + " Доставка в\n" + " <a class=\"link-dotted-invert\" href=\"\" data-ng-click=\"csCtrl.changeCity($event)\">\n" + " <span data-zone-current data-ng-bind=\"zone.City\" data-start-city=\"Москва\">Москва</span>\n" + " </a>\n" + " </div>\n\n\n\n" + " <div data-shipping-variants\n" + " data-type=\"Always\"\n" + " data-start-offer-id=\"18563\"\n" + " data-start-amount=\"1\"\n" + " data-offer-id=\"product.offerSelected.OfferId\"\n" + " data-amount=\"product.offerSelected.AmountBuy\"\n" + " data-sv-custom-options=\"product.customOptions.xml\"\n" + " data-init-fn=\"product.addShippingVariants(shippingVariants)\"></div>\n" + " </div>\n" + " </div>\n" + " \n\n" + "<div data-tabs data-allow-hide-all=\"true\" class=\"mobile-details-tabs\">\n" + " <div class=\"mobile-details-tabs-group\">\n" + " <a id=\"tabDescription\"\n" + " href=\"\"\n" + " class=\"mobile-details-tabs-header-item cs-l-1 link-dotted-invert cs-br-1\"\n" + " data-tab-header=\"\"\n" + " data-ng-hide=\"!tabHeader.isRender\"\n" + " data-ng-class=\"{'mobile-details-tabs-header-item-selected' : tabHeader.selected}\"\n" + " data-ng-click=\"tabs.change(tabHeader)\">\n" + " Описание\n" + " <span class=\"mobile-details-tabs-arrow color-scheme-text-сhameleon\" ng-class=\"{'icon-down-open-before' : tabHeader.selected, 'icon-right-open-before' : !tabHeader.selected }\"></span>\n" + " </a>\n" + " <div class=\"mobile-tabs-content\">\n" + " <div class=\"mobile-tab-content\" data-tab-content=\"tabDescription\" data-ng-class=\"{'mobile-tab-content-active': tabContent.header.selected}\">\n" + " <p><strong>Зая на тему &quot;Времена года&quot; знакомит ребенка с временами года: Весной, Летом, Осенью и Зимой.</strong></p>\n\n" + "<p>Уникальная игрушка-перевертыш 4 в 1 c познавательными сюжетами и разными эмоциями, не имеющая аналогов в мире.</p>\n\n" + "<p>В одной игрушке вы найдете целых четыре разных Заи на одну тему. Просто переверните Заю спинкой или вверх лапами - и вот у вас новая Зая в новом платье.</p>\n\n" + "<p>С каждой стороны Заи мордочки с разными эмоциями: спокойствие или нежность, радость или восторг, обида или грусть, удивление или испуг.&nbsp; Это помогает формировать эмоциональный интеллект ребенка.</p>\n\n" + "<p>У Заи для игр малыша есть два состояния: сон и бодрствование.</p>\n\n" + "<p>Игрушка &quot;Моя Зая&quot; одобрена дошкольными педагогами. Зая в игровой форме развивает у ребенка любознательность, кругозор, словарный запас, связную и грамотную речь, внимание и анализ. Игрушка рекомендована детям от 6 месяцев и до 10 лет. Нашу &nbsp;Заю любят не только дети, но и взрослые).</p>\n\n" + "<p>Ткань &ndash; нежный плюш с нанесенным эксклюзивным принтом.</p>\n\n" + "<p>В качестве набивки используется гипоаллергенный синтепух.</p>\n\n" + "<p>Продукция соответствует требованиям ГОСТ 25779-90, ТР ТС 008/2011</p>\n\n" + " \n" + " </div>\n" + " </div>\n" + " </div>\n\n" + " <div class=\"mobile-details-tabs-group\">\n" + " <a id=\"tabOptions\"\n" + " href=\"\"\n" + " class=\"mobile-details-tabs-header-item cs-l-1 link-dotted-invert cs-br-1\"\n" + " data-tab-header=\"\"\n" + " data-ng-hide=\"!tabHeader.isRender\"\n" + " data-ng-class=\"{'mobile-details-tabs-header-item-selected' : tabHeader.selected}\"\n" + " data-ng-click=\"tabs.change(tabHeader)\">\n" + " Характеристики\n" + " <span class=\"mobile-details-tabs-arrow color-scheme-text-сhameleon\" ng-class=\"{'icon-down-open-before' : tabHeader.selected, 'icon-right-open-before' : !tabHeader.selected }\"></span>\n" + " </a>\n" + " <div class=\"mobile-tabs-content\">\n" + " <div class=\"mobile-tab-content\" data-tab-content=\"tabOptions\" data-ng-class=\"{'mobile-tab-content-active': tabContent.header.selected}\">\n" + " \n" + " </div>\n" + " </div>\n" + " </div>\n\n" + " <div class=\"mobile-details-tabs-group\">\n" + " <a id=\"tabVideos\"\n" + " href=\"\"\n" + " class=\"mobile-details-tabs-header-item cs-l-1 link-dotted-invert cs-br-1\"\n" + " data-tab-header=\"\"\n" + " data-ng-hide=\"!tabHeader.isRender\"\n" + " data-ng-class=\"{'mobile-details-tabs-header-item-selected' : tabHeader.selected}\"\n" + " data-ng-click=\"tabs.change(tabHeader)\">\n" + " Видео\n" + " <span class=\"mobile-details-tabs-arrow color-scheme-text-сhameleon\" ng-class=\"{'icon-down-open-before' : tabHeader.selected, 'icon-right-open-before' : !tabHeader.selected }\"></span>\n" + " </a>\n" + " <div class=\"mobile-tabs-content\">\n" + " <div class=\"mobile-tab-content\" data-tab-content=\"tabVideos\" data-ng-class=\"{'mobile-tab-content-active': tabContent.header.selected}\">\n" + " <div data-videos data-product-id=\"4579\"></div>\n" + " </div>\n" + " </div>\n" + " </div>\n\n\n" + "</div>\n\n\n" + " \n\n" + " \n\n\n\n" + "</div>\n" + " <footer id=\"footer\">\n" + " <div class=\"pre-footer\">\n" + " <div class=\"static-block\" >\n" + " <div class=\"bigBtnsPanel\">\n" + " <div class=\"row\">\n" + " <div class=\"cs-br-1 col-xs-6\">\n" + " <div class=\"panel-btn-text\">\n" + " <a class=\"panel-btn cs-l-2 inked ink-dark\" href=\"javascript:void(0);\">\n" + " <span class=\"panel-btn-icon cs-bg-12 cs-l-9 icon-vk-before icon-margin-drop\"></span>\n" + " Мы в Вконтакте\n" + " </a>\n" + " </div>\n" + " </div>\n" + " <div class=\"cs-br-1 col-xs-6\">\n" + " <div class=\"panel-btn-text\">\n" + " <a class=\"panel-btn cs-l-2 inked ink-dark\" href=\"javascript:void(0);\">\n" + " <span class=\"panel-btn-icon cs-bg-12 cs-l-9 icon-fb-before icon-margin-drop\"></span>\n" + " Мы в Facebook\n" + " </a>\n" + " </div>\n" + " </div>\n" + " </div>\n" + " <div class=\"row\">\n" + " <div class=\"cs-br-1 col-xs-12\">\n" + " <div class=\"panel-btn-text\">\n" + " <a class=\"panel-btn cs-l-2 inked ink-dark\" href=\"javascript:void(0);\">\n" + " <span class=\"panel-btn-icon cs-bg-12 cs-l-9 icon-tw-before icon-margin-drop\"></span>\n" + " Мы в Twitter\n" + " </a>\n" + " </div>\n" + " </div>\n" + " </div>\n" + " </div>\n" + "</div>\n" + " </div>\n" + " <div class=\"panel no-borders\">\n" + " <div class=\"static-block\" >\n" + " <h3>Мы принимаем</h3> <div><br /> <img src=\"./areas/mobile/images/cards.png\" alt=\"Мы принимаем следующие виды оплаты\" /> <br /> </div>\n" + "</div>\n" + " </div>\n" + " <div class=\"panel no-borders\">\n" + " <div class=\"footer-links clear\">\n" + " <a class=\"footer-link\" href=\"https://davaydarit.ru/?forcedDesktop=true\">Полная версия сайта</a>\n" + " </div>\n" + " </div>\n" + "</footer>\n" + " </div>\n" + " <div id=\"sidebar_overlay\" data-ng-controller=\"sidebarCtrl as sbCtrl\" data-ng-click=\"sbCtrl.toggleSidebar()\"></div>\n" + "<aside id=\"sidebar\">\n" + " <a href=\"https://davaydarit.ru/\" class=\"head cs-t-4\">\n" + " <img src=\"./areas/adminmobile/images/uiIcons/avatarUnknown.png\" alt=\"avatar\">\n" + " <span class=\"username\">ДАВАЙДАРИТЬ.РУ - подарки оптом и в розницу</span>\n" + " </a>\n" + " <div class=\"menu\">\n" + " <div data-city-selector-panel></div>\n" + " <a class=\"left cs-br-4 cs-bg-14 inked ink-light\" href=\"pages/about\" >\n" + " <span>О компании</span>\n" + " </a>\n" + " <a class=\"left cs-br-4 cs-bg-14 inked ink-light\" href=\"/catalog\" >\n" + " <span>Каталог</span>\n" + " </a>\n" + " <a class=\"left cs-br-4 cs-bg-14 inked ink-light\" href=\"pages/paymentandshipping\" target=\"_blank\" >\n" + " <span>Доставка</span>\n" + " </a>\n" + " <a class=\"left cs-br-4 cs-bg-14 inked ink-light\" href=\"pages/payment\" target=\"_blank\" >\n" + " <span>Оплата</span>\n" + " </a>\n" + " <a class=\"left cs-br-4 cs-bg-14 inked ink-light\" href=\"\" >\n" + " <span>Акции</span>\n" + " </a>\n" + " <a class=\"left cs-br-4 cs-bg-14 inked ink-light\" href=\"pages/optovikam\" target=\"_blank\" >\n" + " <span>Оптовикам</span>\n" + " </a>\n" + " <a class=\"left cs-br-4 cs-bg-14 inked ink-light\" href=\"pages/contacts\" >\n" + " <span>Контакты</span>\n" + " </a>\n" + " \n" + " </div>\n" + "</aside>\n\n" + " \n" + "<link rel=\"stylesheet\" type=\"text/css\" href=\"/combine/mobile.css?B45726CA9B87923C6A079319B221B986\" />\n\n\n" + "<script type=\"text/javascript\" src=\"/combine/mobile.js?464673DBEE75AD18C98C793E5A46CF8E\"></script>\n\n\n" + " <div data-toaster-container data-toaster-options=\"{'close-button': true}\">\n" + "</div>\n" + "<div hidden>\n" + "</div>\n" + " <link href=\"modules/storereviews/styles/storereviews.css\" rel=\"stylesheet\">\n" + " \n" + " <div class=\"static-block\" >\n" + " <!-- BEGIN JIVOSITE CODE {literal} -->\n" + "<script type='text/javascript'>\n" + "(function(){ var widget_id = 'JdCvGwZs7b';\n" + "var s = document.createElement('script'); s.type = 'text/javascript'; s.async = true; s.src = '//code.jivosite.com/script/widget/'+widget_id; var ss = document.getElementsByTagName('script')[0]; ss.parentNode.insertBefore(s, ss);})();</script>\n" + "<!-- {/literal} END JIVOSITE CODE -->\n" + "</div>\n" + " </body>\n" + "</html>"; final Pattern pattern = Pattern.compile(regex, Pattern.DOTALL | Pattern.UNICODE_CASE | Pattern.UNICODE_CHARACTER_CLASS); final Matcher matcher = pattern.matcher(string); while (matcher.find()) { System.out.println("Full match: " + matcher.group(0)); for (int i = 1; i <= matcher.groupCount(); i++) { System.out.println("Group " + i + ": " + matcher.group(i)); } } } }

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 Java, please visit: https://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html