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
No Match

r"
"
gm

Test String

Code Generator

Generated Code

package main import ( "regexp" "fmt" ) func main() { var re = regexp.MustCompile(`(?m)<a href=\"(.+?)\">\n.+?\n.+?\n.+?\n.+?\n.+?\n.+?h4>(.+?)<.+?\n.+?\n.+?\n.+?\n.+?\n.+?score\">(.+?)<.+?\n.+?\n.+?status\">(.+?)<.+?\n.+?\n.+?\n.+?\n.+?\n.+?\n.+?h4>(.+?)<`) var str = ` <html class="v2" dir="ltr" xmlns="http://www.w3.org/1999/xhtml" xmlns:b="http://www.google.com/2005/gml/b" xmlns:data="http://www.google.com/2005/gml/data" xmlns:expr="http://www.google.com/2005/gml/expr"><head> <title> OVOSTREAMS - HOME PAGE</title> <link rel="icon" href="/image/favicon.ico" type="image/x-icon"/> <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet"> <style type="text/css"> <!-- /* ######## Reset Css ######################### */ .section { margin:0; } .widget { margin:0; } ul, li, ol, p { padding:0; margin:0; } .navbar, .Attribution, h2.date-header, h4.date-header, .feed-links { height:0 !important; opacity:0; display:none; visibility:hidden; } img { max-width:100%; vertical:align:middle; } a { text-decoration: none; color: #000; } /* ######## Body Css ######################### */ body { background: #e4e0db; font-family: 'Open Sans', sans-serif; } span.widget-item-control { display: none; } #puremag-outter { background-image: url(https://2.bp.blogspot.com/-5FmmDZlh1Tg/XSv5VrkCf-I/AAAAAAAABFI/9CJTw7MNhYMcSTRvDgElHa1KOEtqiDXCACLcBGAs/s1600/background.png); background-position: left top; background-size: auto; background-repeat: repeat; background-attachment: fixed; } /* ######## Main-Header Css ######################### */ #main-header { padding: 15px 0; width: 1103px; margin: 0 auto; overflow: hidden; box-sizing: border-box; } .left-header { display: inline-block; float: left; padding: 15px 0px 0px 0px; } .left-header h1 { font-size: 16px; } .Header .description { margin-top: -5px; font-weight: bold; font-family: 'Frank Ruhl Libre',Arial,sans-serif; color: #000000; margin-left: 32px; } .right-header { display: inline-block; float: right; } #main-header h1 { font-family: 'Frank Ruhl Libre', serif; margin-bottom: 10px; font-size: 28px; font-weight: bold; color: #8c2828; } .item #main-header a { color: #8c2828; } /* ######## Menu Css ######################### */ #menu { color: #FFF; text-align: left; margin: 0 auto; width: 1103px; height: 45px; background: #ffffff; border: 1px solid rgba(0,0,0,.2); } #menu ul,#menu li{margin:0 auto;padding:0 0;list-style:none} #menu ul { height: 45px; display: inline-block; } #menu ul li > a { border-right: 1px solid #dddddd; } #menu li{float:left;display:inline;position:relative;font:bold 0.9em Arial;} #menu a { letter-spacing: 0.5px; font-weight: normal; color: #333333; text-transform: uppercase; display: block; text-align: left; line-height: 45px; padding: 0 11px; text-decoration: none; font-size: 13px; font-family: 'Oswald', sans-serif; } #menu li a:hover{ background:#000000; color: #fff; -webkit-transition: all .1s ease-in-out; -moz-transition: all .1s ease-in-out; -ms-transition: all .1s ease-in-out; -o-transition: all .1s ease-in-out; transition: all .1s ease-in-out; } #menu input{display:none;margin:0 0;padding:0 0;width:80px;height:55px;opacity:0;cursor:pointer} #menu label{font:bold 30px Arial;display:none;width:45px;height:55px;line-height:55px;text-align:center} #menu label span{font-size:16px;position:absolute;left:35px} #menu ul li ul{ height: auto; background:#fff; width: 180px; left:0px; position: absolute; z-index: 99; display:none; } #menu ul li ul li ul { top:0px; left:180px; position: absolute; z-index: 99; visibility:hidden; } #menu ul.menus li{ display: block; width: 100%; font:normal 0.8em Arial; text-transform: none; text-shadow: none; } #menu ul.menus a{ color: #333333; font-size: 13px; font-family: 'Oswald', sans-serif; line-height: 35px; } #menu ul > li:hover ul{ display:block; } #menu ul > li > ul > li:hover ul{ display:block; visibility:visible; } #menu ul.menus a:hover{ background-color: #000000; color: #fff; -webkit-transition: all .1s ease-in-out; -moz-transition: all .1s ease-in-out; -ms-transition: all .1s ease-in-out; -o-transition: all .1s ease-in-out; transition: all .1s ease-in-out; } /* ######## Main-post Css ######################### */ #content-wrap { width: 1103px; margin: 20px auto; box-sizing: border-box; overflow: hidden; } .main-post { width: 66%; float:left; background:#fff; border: 1px solid rgba(0,0,0,.2); } .sidebar { width: 32%; float: right; } .post { box-sizing: border-box; padding: 15px 15px 8px; background: #fff; } .block-image { width: 47%; margin-right: 3%; float: left; } .thumb img { width: 100%; object-fit: cover; height: 240px; } .thumb { width:100%; height:240px; } .post-footer { display: none; } .read-text { display: inline-block; } .index .post-labels a { display: inline-block; color: #ffffff !important; background: #8c2828 !important; padding: 3px 5px; font: normal normal 12px Oswald; line-height: 1; margin: 0 5px 2px 0; text-transform: uppercase; letter-spacing: 0.5px; } h2.post-title.entry-title a { color: #000000 !important; line-height: 1.2; font-family: 'Oswald', sans-serif; text-transform: none; font-weight: 300; letter-spacing: 0.5px; } h2.post-title.entry-title { margin: 7px 0 7px 0; } .comment-post { display: inline-block; } .meta-post { margin: 0 0 6px 0; } span.meta-date:before { content: '\2022'; color: #666666 } .comment-post:before { content: '\2022'; color: #666666 } .meta-post span,.meta-post a { color: #666666 !important; font: normal normal 13px Oswald; text-transform: uppercase; display: inline-block; letter-spacing: 0.3px; } span.meta-date { margin: 0 5px; } abbr.published { text-decoration: none; } a.read-more { display: inline-block; background: #333333 !important; color: #ffffff !important; padding: 5px 10px; font: normal normal 13px Oswald,Arial,Helvetica,sans-serif; text-transform: uppercase; } .read-text { display: inline-block; margin: 5px 0 0 0; } .post-summary p { color: #555555; font: normal normal 14px Domine,Arial,Helvetica,sans-serif; line-height: 1.6; text-align: justify; margin-bottom: 10px; } .post-summary { display:block; padding-top: 0px; margin-bottom:10px; } #blog-pager-newer-link:before { content: "\f177"; font-size: 13px; margin-right: 5px; color: #C90000; font-family: fontawesome; } #blog-pager-newer-link { font-family: Domine,Arial,sans-serif; font-size: 14px; line-height: 1.6; } #blog-pager-newer-link a { color: #8c2828; } /* ######## Social Sharing Widget ######################### */ .share-box { position: relative; padding: 10px; } .share-title { border-bottom: 2px solid #777; color: #010101; display: inline-block; padding-bottom: 7px; font-size: 15px; font-weight: 500; position: relative; top: 2px; } .share-art { float: right; padding: 0; padding-top: 0; font-size: 13px; font-weight: 400; text-transform: capitalize; } .share-art a { color: #fff; padding: 3px 8px; margin-left: 4px; border-radius: 2px; display: inline-block; margin-right: 0; background: #010101; } .share-art a span { display: none; } .share-art a:hover{color:#fff} .share-art .fac-art{background:#3b5998} .share-art .fac-art:hover{background:rgba(49,77,145,0.7)} .share-art .twi-art{background:#00acee} .share-art .twi-art:hover{background:rgba(7,190,237,0.7)} .share-art .goo-art{background:#db4a39} .share-art .goo-art:hover{background:rgba(221,75,56,0.7)} .share-art .pin-art{background:#CA2127} .share-art .pin-art:hover{background:rgba(202,33,39,0.7)} .share-art .lin-art{background:#0077B5} .share-art .lin-art:hover{background:rgba(0,119,181,0.7)} .share-art .wat-art{background:#25d266;display:none;} .share-art .wat-art:hover{background:rgba(37, 210, 102, 0.73)} @media only screen and (max-width: 768px) { .share-art .wat-art{display:inline-block;} } /* ######## Side-bar Css ######################### */ .sidebar .widget { background: #ffffff; position: relative; padding: 15px; margin-bottom: 30px; word-break: normal; word-wrap: break-word; overflow: hidden; border: 1px solid rgba(0,0,0,.2); } .sidebar h2 { font: normal normal 16px Oswald,Arial,Helvetica,sans-serif; line-height: 1; color: #686868; margin: -15px -15px 15px -15px; padding: 10px 0; text-transform: uppercase; text-align: center; border-bottom: 1px solid #dfdfdf; } .sidebar .popular-posts ul li { line-height:1.4; margin: 0; padding: 8px 0px 8px 0px; border-bottom: 1px solid #eeeeee; list-style-type:none; } .sidebar .popular-posts ul { margin:0px; padding:0px; } .sidebar .popular-posts ul li a { text-transform: capitalize; letter-spacing: 0.5px; color: #313131; line-height: 1.6; font-size: 14px; font-family: Domine,Arial,sans-serif; } .label-size a { letter-spacing:0.5; font-size: 14px; font-family: Domine,Arial,sans-serif; float:left; display: inline-block; color: #ffffff !important; background: #888888 !important; border: 0px solid #cccccc; padding: 3px 5px; margin: 0 10px 8px 0; text-decoration: none; line-height: 1; -webkit-transition: .2s ease-in; -moz-transition: .2s ease-in; -o-transition: .2s ease-in; transition: .2s ease-in; text-shadow: none !important; } /* ######## Footer Css ######################### */ #multifooter-wrap { box-shadow: 0 0 2px #000000; position: relative; margin: 0 auto; padding: 10px 0; background: #252525; color: #cecece; word-wrap: break-word; } #multi-footer { overflow:hidden; width: 1103px; margin: 0 auto; } .footer { float: left; width: 256px; padding: 20px 19px 0 0; margin: 0; } .footer:last-child { padding-left:0px; margin:0px; } .footer h2 { letter-spacing:0.3px; font: normal normal 16px Oswald,Arial,Helvetica,sans-serif; line-height: 1; margin: 0 0 15px; padding: 0 0 15px; color: #ffffff; text-transform: uppercase; border-bottom: 1px dotted #5A5656; } .footer .recent-post-title a { color: #dbdbdb; } .footer .popular-posts ul li a { text-transform: capitalize; letter-spacing: 0.5px; color: #dbdbdb; line-height: 1.6; font-size: 14px; font-family: Domine,Arial,sans-serif; } .footer .recent-post-title li { line-height: 25px; } .footer ul.recent-posts-container li { border-bottom: 1px solid #353232; line-height: 11.2px; } .footer .popular-posts ul li { list-style-type:none; border-bottom: 1px solid #353232; line-height: 25px; } .footer .popular-posts ul { margin:0px; padding:0px; } .footer .widget p { font-size: 14px; font-family: Domine,Arial,sans-serif; line-height: 1.6; text-align: justify; } #BlogArchive1_ArchiveMenu { width: 100%; color: #555555; border: 1px solid rgba(0,0,0,.2); padding: 5px 0px; font-family: Domine,Arial,sans-serif; } #credit-footer { width: 100%; box-shadow: 0 0 2px #000000; background: #303436; margin: 0 auto; border-top: 1px solid #3D3D3D; text-align: center; } .copyright { padding: 25px 0; } .copyright p,.copyright a { color: #ECFFF1; font: normal normal 13px Domine,Arial,Helvetica,sans-serif; } a.home-link { display: none; } #blog-pager-older-link { float: none; font-family: Domine,Arial,sans-serif; font-size: 14px; line-height: 1.6; } #blog-pager-older-link a:after { content: "\f178"; font-size: 13px; margin-left: 5px; color: #C90000; font-family: fontawesome; } #blog-pager-older-link a { color:#8c2828; } #blog-pager { margin: 1em 0; text-align: right; overflow: hidden; padding: 0 12px; } /* ######## Post Css ######################### */ .item .post-labels { margin: -15px -15px 6px -15px !important; padding: 10px 15px !important; border-bottom: 1px dotted #ddd; display: block; text-align: center; } .item .post-labels a { letter-spacing: 0.3px; color: #666666; font: normal normal 12px Oswald,Arial,Helvetica,sans-serif; text-transform: uppercase; } .item .post-labels a:before { content: "\f115"; font-family:fontawesome; margin-right:3px; } .item h1.post-title.entry-title { text-align: center; } .item h1.post-title.entry-title { margin-bottom: 10px; color: #000000 !important; line-height: 1.2; font-family: 'Oswald', sans-serif; text-transform: none; font-weight: 300; letter-spacing: 0.5px; } .item .meta-post { text-align: center; } .item span.meta-author:before { content: "\f2be"; font-size: 12px; font-family:fontawesome; margin-right:3px; } .item span.meta-date:before { content: "\f017"; font-size: 12px; font-family:fontawesome; margin-right:3px; } .item .comment-post:before { content: "\f0e6"; font-size: 12px; font-family:fontawesome; margin-right:3px; } .item .post-body { color: #555555; line-height: 1.7; font-family: Domine,Arial,sans-serif; font-size: 14px; } .item a.home-link { font-family: Domine,Arial,sans-serif; font-size: 14px; line-height: 1.6; color: #8c2828; display: -webkit-inline-box; float: left; } .item a.home-link:before { content: "\f177"; font-size: 13px; margin-right: 5px; color: #C90000; font-family: fontawesome; } /* ######## Comment Css ######################### */ .comments .comments-content .comment:first-child { overflow: hidden; border: 1px solid #eaeaea; margin: 12px 12px 20px 12px; padding: 15px; background: #f5f5f5; } .comments .comments-content .user { font-style: normal; display: -webkit-box; font-weight: bold; } .comments .comments-content .user a { font: normal normal 13px Domine, Arial, Helvetica, Sans-serif; line-height: 1.6; color: #555555; font-weight: 700; } .comments .comments-content .comment:last-child { border: 1px solid #eaeaea; margin: 12px 12px 20px 12px; padding: 15px; background: #f5f5f5; } .comments .comments-content .comment:first-child { border: 1px solid #eaeaea; margin: 12px 12px 20px 12px; padding: 15px; background: #f5f5f5; } .comments .comments-content .icon.blog-author { display: none; margin: 0px; } .comments .comments-content .comment-content { color: #161514; font-family: Domine,Arial,sans-serif; font-size: 14px; line-height: 1.6; text-align: justify; } .comments .comments-content .datetime a { color: #C90000; margin-left: 0; font: normal normal 13px Domine, Arial, Helvetica, Sans-serif; line-height: 1.6; text-decoration: none; outline: none; } .comments .comments-content .datetime { margin:0px; } .comments .comment-block { margin-left: 0px; position: relative; } .comments .avatar-image-container { float: left; max-height: 36px; margin-right: 10px; overflow: hidden; width: 36px; } span.blog-admin, span.pid-353262945 { display: inline; float: right; } .comments .comment .comment-actions a { padding-right: 5px; font: normal normal 14px Domine, Arial, Helvetica, Sans-serif; line-height: 1.6; font-style: italic; color: #C90000; text-decoration: none; outline: none; padding-top: 5px; } .comments .comment .comment-actions a:hover { color:#000000; text-decoration:none; } #comments h4 { color: #444; font: normal normal 13px Domine, Arial, Helvetica, Sans-serif; line-height: 1.6; padding: 0em 1em; text-transform:uppercase; text-decoration: none; outline: none; } color: #444; font: normal normal 13px Domine, Arial, Helvetica, Sans-serif; line-height: 1.6; text-decoration: none; outline: none; } .comments .comments-content .comment-replies { margin-left: 0px; margin-top: 0em; } .comments .continue a { bottom: 590px; padding-left: 28px; position: absolute; font: normal normal 14px Domine, Arial, Helvetica, Sans-serif; line-height: 1.6; font-style: italic; /* color: #444; */ color: #C90000; display: inline-block; font-size: 14px; } .comments .comments-content .comment { border: 1px solid #eaeaea; margin: 12px 12px 20px 12px; padding: 15px; background: #f5f5f5; margin-bottom: 16px; padding-bottom: 8px; } /* ######## Contact Form Widget By Sorabloggingtips.com ######################### */ .contact-form-name, .contact-form-email, .contact-form-email-message, .contact-form-widget { max-width: none; } .contact-form-name, .contact-form-email, .contact-form-email-message { background-color: #EBEBEB; border: 1px solid #ccc; } .contact-form-widget .form { } .contact-form-button-submit { max-width: none; width: 100%; height: 35px; border:0; background-image: none; background-color: #8c2828 !important; cursor: pointer; font-style: normal; font-weight: 400; } .contact-form-name:focus, .contact-form-email:focus, .contact-form-email-message:focus { border: 0; box-shadow: none; } .contact-form-name:hover, .contact-form-email:hover, .contact-form-email-message:hover { border: 0; } .contact-form-button-submit:hover { background-color: #303030; background-image: none; border: 0; } /* ######## 404-page Css ######################### */ body.error_page .feat-slider-wrap { display:none; } body.error_page .sidebar { display:none; } body.error_page .main-post { width: 100%; float: left; } .status-msg-wrap { font-size: 100%; margin: none; position: static; width: 100%; } .status-msg-border { display:none } .status-msg-body { padding: none; position: static; text-align: inherit; width: 100%; z-index: auto; } .status-msg-wrap a { padding: none; text-decoration: inherit; } .BB-404-box { background:#FFFFFF; width:98%; margin:10px 0px; padding:20px 10px; border:1px solid #ddd; -moz-border-radius:6px; -webkit-border-radius:6px; border-radius:6px; box-shadow: 5px 5px 5px #CCCCCC; } /* ######## Static-page Css ######################### */ .static_page .meta-post { display: none; } .static_page h1.post-title.entry-title { margin-bottom: 10px; text-transform: uppercase; font: normal normal 28px 'Playfair Display',Arial,Helvetica,sans-serif; color: #000000 !important; line-height: 1.2; letter-spacing: 0.5px; } .static_page .post-body { color: #555555; line-height: 1.7; font-family: Domine,Arial,sans-serif; font-size: 15px; } /* ######## Author Widget By Sorabloggingtips.com ######################### */ .sora-author-box { border: 1px solid #f2f2f2; background: #f8f8f8; overflow: hidden; padding: 10px; margin: 10px 0; } .sora-author-box img { float: left; margin-right: 10px; border-radius: 50%; } .sora-author-box p { padding: 10px; } .sora-author-box b { font-size: 20px; } --></style> <style id="template-skin-1" type="text/css"><!-- body#layout { width:900px; } body#layout #main-header { width:900px; } body#layout .right-header { width: 450px; margin:0px; padding:0px; } body#layout .left-header { width: 450px; margin:0px; padding:0px; } body#layout .wrapper { width: 900px; margin:0px; padding:0px; } body#layout #header-wrap { width: 900px; padding: 0px; margin: 0; } body#layout .header-logo { width: 450px; display: inline-block; float: left; } body#layout .header-ads { width: 450px; display: inline-block; float: left; } body#layout #content-wrap { width: 900px; margin: 0; padding: 0px; overflow: hidden; } body#layout .main-post { width:450px; margin:0px; float:left; } body#layout .sidebar { width: 450px; float: right; margin:0px; padding:0px; } body#layout .navbar { display:block; } body#layout #lower-footer { width:900px; overflow:hidden; padding:0px; margin:0px; } body#layout div.section { background-color: #f8f8f8; border: 1px solid #ccc; font-family: Roboto, sans-serif; margin: 0 4px 8px 4px; overflow: visible; padding: 15px; position: relative; } body#layout div.layout-title { font-size: 16px; color: black; font-family: monospace; } body#layout .add_widget { border: 4px double black; padding: 16px; position: relative; text-align: left; background:pink; } body#layout .section h4 { font-size: 19px; line-height: 24px; margin: 2px 24px 8px 24px; text-align: center; font-family: monospace; color:red; } body#layout div.layout-widget-description { color: rgba(0,0,0,0.52); font-size: 14px; display: none; visibility: hidden; } body#layout .draggable-widget .widget-wrap2 { background: #9E9E9E url(/img/widgets/draggable.png) no-repeat 4px 50%; cursor: move; } body#layout #footer-wrap { width:800px; overflow:hidden; } body#layout .footer { width:225px; margin:0px; padding:0px; float:left; } body#layout #menu { display: none; } body#layout .social { display: none; } body#layout #combo-post .ext-post:last-child { margin-right:0px; } @media screen and (max-width: 800px){ p.description { font-size: 15px; } .Header h1 { font-size:30px; } #body-wrapper { box-sizing: border-box; width: 90%; margin: 0 auto; } .wrapper { width: 100%; } .header-logo { float:none; display: block; text-align: center; } .search-bar { display:none; } #content-wrap { width:100%; } .post { width: 100%; margin-right: 12px; } .post-summary p { font-size: 13px; } h2.post-title.entry-title a, h1.post-title.entry-title { font-size: 22px; } .meta-post a, .meta-post p { font-size:13px; } .label p, .label a { font-size:13px; } .comment-post a { font-size:13px; } #blog-pager-older-link a { font-size: 13px; color: #C90000; } .sidebar .tt a { font-size:13px; } .footer .tt a { font-size:13px; } .sample-text p { font-size:13px; } .label-size a { font-size:13px; } .text-widget p { font-size:13px; } #copyright a { font-size:13px; } #copyright p { font-size:13px; } .popular-posts ul li a { font-size:13px; } a.read-more { font-size:13px; } .post-body { font-size: 13px; text-align: justify; } .main-post { width:100%; } .sidebar { padding: 0px; width: 100%; } #lower-footer { width: 100%; } .footer { width: 100%; } #menu ul.menus a { color: #161514; line-height: 35px; } #menu ul.menus li { text-align:left; display: block; width: 100%; font: normal 0.8em Arial; text-transform: none; text-shadow: none; } #menu{position:relative} #menu ul{background:#fff;position:absolute;top:100%;right:0;left:0;z-index:3;height:auto;display:none} #menu ul li ul, #menu ul li ul li ul{width:100%;position:static;padding-left:20px} #menu li{text-align:left;display:block;float:none;width:auto; font:normal 0.8em Arial;} #menu input, #menu label { width: 100%; position: absolute; top: 0; color: #111; background: #f5f5f5; left: 0px; display: block; } #menu ul li:hover li ul { display:none; } #menu input{z-index:4} #menu input:checked + label{color:black;} #menu input:checked ~ ul{display:block} #menu { color: #FFF; text-align: center; margin: 0 auto; width: 100%; height: 55px; border-top: 1px solid #eaeaea; border-bottom: 1px solid #eaeaea; } #menu a { letter-spacing: 0.2px; color: #161514; } #menu ul li ul { background:#fff; } } @media screen and (max-width: 500px){ .recent-post-title a,.popular-posts ul li a { font-size:12px; } .footer h2 { font-size:14px; padding-left: 12px; letter-spacing: 0.2px; } .footer .widget p { font-size:14px; } .footer .popular-posts ul li,.footer ul.recent-posts-container li { padding-left: 12px; } .left-header { display: block; float: none; text-align: center; } .right-header { display: block; float: none; text-align: center; } #multi-footer { width:100%; } .block-image { width:100%; max-width: none; float:none; } span.post-labels { display: block; text-align: center; margin: 5px 0; } .meta-post a, .meta-post p { font-size: 12px; } h2.post-title.entry-title a, h1.post-title.entry-title { font-size: 20px; line-height: 24px; } .post-summary p { text-align: justify; font-size: 12px; line-height: 1.5; } .label p, .comment-post span { font-size: 12px; } .label a, .comment-post a { font-size:12px; } .mix { display:block; padding: 0px 10px; } h2.post-title.entry-title { text-align:center; margin-bottom: 10px; line-height: 22px; } #blog-pager-older-link a { font-size: 12px; } .post-body { font-size: 12px; } .sidebar .tt a { font-size:12px; } .footer .tt a { font-size:12px; } .sample-text p { font-size:12px; } .label-size a { font-size:12px; } .text-widget p { font-size:12px; } #copyright a { font-size:12px; } #copyright p { font-size:12px; } .popular-posts ul li a { font-size:12px; } .mixx { text-align: center; } .read-text { text-align: center; display: block; } .meta-post { display:none; padding: 3px 0px; } p.description { font-size: 13px; } .Header h1 { font-size:25px; } } @media screen and (max-width: 1024px){ #puremag-outter { width:90%; margin: 0 auto; box-sizing: border-box; } #main-header { width:100%; } #menu { width:100%; } .main-post,.sidebar { width: 100%; } .sidebar h2 { text-align: left; padding: 10px 15px; } .footer .widget p { padding: 0 15px; } .left-header { display: block; float: none; text-align: center; } .right-header { display: block; float: none; text-align: center; } #content-wrap { width:100%; } #multifooter-wrap { width: 100%; } #multi-footer { width:100%; } .footer { width: 100%; } .footer ul.recent-posts-container li,.footer .popular-posts ul li { padding-left: 15px; } .footer h2 { padding-left: 15px; } .cloud-label-widget-content { padding-left: 15px; } } .main-post { background: none; border:none } .date { text-align: center; font-size: 20px !important; padding: 1rem !important; } .post{margin-bottom:1rem; padding: 0;} .match-view-headT{display:table;table-layout:fixed;width:95%;margin:auto} .match-view-head-side1,.match-view-head-side2{font-size:1.3em;font-weight:900;text-transform:uppercase;vertical-align:top;line-height:20px;padding-top:2px;letter-spacing:-.7px;word-wrap:break-word;text-align:center;position:relative} .match-view-head-side1,.match-view-head-side2,.match-view-headSS{display:table-cell} .event-team img{width:85px} .event-team h4{font-weight:800;color:#00222e} .match-view-headSS{text-align:center;vertical-align:middle;font-weight:600;line-height:30px} .match-view-headSS .score{min-width:36px;border-radius:10px;display:inline-block;padding:5px 0;min-height:42px;vertical-align:middle;margin:0 18px;font-size:18px;text-align:center}.event-status{margin:10px 0;font-size:16px}.match-view-headSS .start-time{font-size:2em;line-height:.6em;font-weight:300;color:#888;border-color:#eee;letter-spacing:0}.days-left{font-size:.8em;color:#c74a58;font-weight:700;margin-bottom:8px}.goal-incidents{padding:0;list-style:none}.goal-incidents li{padding-top:5px;padding-bottom:5px;color:#3a0115;position:relative;font-weight:400;vertical-align:middle;line-height:15px;min-height:15px;font-size:1.1em;cursor:pointer;margin-top:6px}.side1{text-align:right;margin-right:50%;padding-right:46px}.side2{text-align:left;margin-left:50%;padding-left:46px}.sidestatus{position:absolute;top:3px;width:60px;text-align:center;color:#3a0115;font-weight:400;line-height:20px;right:-24px}.side2 .sidestatus{left:-35px} --></style> </head> <body class="item"> <div id="puremag-outter"> <div id="main-header"> </div> </div> <nav id="menu"> <ul> <li><a href="/">OVOSTREAMS - Home Page</a></li> </ul> </nav> <div id="content-wrap"> <div class="main-post"> <div class="main section" id="Main"> <div class="widget Blog" data-version="1" id="Blog1"> <div class="blog-posts hfeed"> <div class="date-outer"> <div class="date-posts"> <div class="post-outer"> <div class="hentry uncustomized-post-template"> <div class="date post post-body entry-content"> Watch Games For 11/01/2020 </div> <a href="/aston-villa-vs-man-city.php"> <div class=" post post-body entry-content"> <div class="match-view-headT"> <div class="match-view-head-side1"> <div class="event-team"> <img src="https://www.sofascore.com/images/team-logo/football_40.png"> <h4>Aston Villa</h4> </div> </div> <div class="match-view-headSS"><div> <div> <span class="score">NBC Sport HD</span> </div> <div class="event-status">17:30 PM</div> </div> </div> <div class="match-view-head-side2"> <div class="event-team"> <img src="https://www.sofascore.com/images/team-logo/football_17.png"> <h4>Manchester City</h4> </div> </div> </div> </div> </a> <a href="/real-madrid-vs-atl-madrid.php"> <div class=" post post-body entry-content"> <div class="match-view-headT"> <div class="match-view-head-side1"> <div class="event-team"> <img src="https://www.sofascore.com/images/team-logo/football_2829.png"> <h4>Real Madrid</h4> </div> </div> <div class="match-view-headSS"><div> <div> <span class="score">Spain Super Cup</span> </div> <div class="event-status">19:00 PM</div> </div> </div> <div class="match-view-head-side2"> <div class="event-team"> <img src="https://www.sofascore.com/images/team-logo/football_2836.png"> <h4>Atlético Madrid</h4> </div> </div> </div> </div> </a> <a href="/roma-vs-juventus.php"> <div class=" post post-body entry-content"> <div class="match-view-headT"> <div class="match-view-head-side1"> <div class="event-team"> <img src="https://www.sofascore.com/images/team-logo/football_2702.png"> <h4>AS Roma</h4> </div> </div> <div class="match-view-headSS"><div> <div> <span class="score">Serie A</span> </div> <div class="event-status">20:45 PM</div> </div> </div> <div class="match-view-head-side2"> <div class="event-team"> <img src="https://www.sofascore.com/images/team-logo/football_2687.png"> <h4>Juventus</h4> </div> </div> </div> </div> </div> </a> </div> </div></div> </div> <div class="clear"></div> </div></div> </div> <div class="sidebar"> <div class="main section" id="Sidebar"> <script id="cid0020000226121218825" data-cfasync="false" async src="//st.chatango.com/js/gz/emb.js" style="width: 100%;height: 75%;">{"handle":"ovostreamschat","arch":"js","styles":{"a":"383838","b":30,"c":"FFFFFF","d":"FFFFFF","f":30,"i":30,"k":"383838","l":"383838","m":"383838","n":"FFFFFF","o":30,"p":"10.89","q":"383838","r":30,"ab":false,"surl":0,"cnrs":"1","fwtickm":1}}</script> </div> </div> </div> <div id="menu"> <div id="credit-footer"> <div class="copyright"> <p>Created with <i aria-hidden="true" class="fa fa-heart" style="color: red;margin:0 2px;"></i> </p> </div> </div> </div> </div> </body></html>` for i, match := range re.FindAllString(str, -1) { fmt.Println(match, "found at index", 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 Golang, please visit: https://golang.org/pkg/regexp/