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

import java.util.regex.Matcher; import java.util.regex.Pattern; public class Example { public static void main(String[] args) { final String regex = ">[^A-Za-z0-9<]*(\\w[^<]*?)[^A-Za-z0-9<]*<"; final String string = "\n" + "<!DOCTYPE html>\n" + "<html lang=\"en\">\n" + "<head>\n\n" + " <meta charset=\"utf-8\" />\n" + " <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n" + " <meta name=\"title\" content=\"EPITA.it\" />\n" + " <meta name=\"description\" content=\"Portail vers des services en lien avec l'EPITA\" />\n" + " <meta name=\"keywords\" content=\"Epidocs, portail, portal, open, source, open-source, services, sites, internet, website, , documents, utiles, useful, étudiants, students, EPITA\" />\n" + " <meta name=\"author\" content=\"Matiboux\" />\n\n" + " <link rel=\"icon\" sizes=\"48x48\" href=\"/assets/icon-48.png?v=3eecd7b5b45a2b51c9acc74625c417d54a724854\" />\n" + " <link rel=\"icon\" sizes=\"192x192\" href=\"/assets/icon-192.png?v=3eecd7b5b45a2b51c9acc74625c417d54a724854\" />\n" + " <link rel=\"icon\" sizes=\"512x512\" href=\"/assets/icon-512.png?v=3eecd7b5b45a2b51c9acc74625c417d54a724854\" />\n" + " <link rel=\"apple-touch-icon\" href=\"/assets/apple-icon.png?v=3eecd7b5b45a2b51c9acc74625c417d54a724854\" />\n\n" + " <link rel=\"manifest\" href=\"/manifest.json\" />\n" + " <meta name=\"theme-color\" content=\"#183048\" />\n\n" + " <link rel=\"stylesheet\" href=\"https://use.fontawesome.com/releases/v5.8.2/css/all.css\" />\n" + " <link rel=\"stylesheet\" href=\"https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css\" />\n" + " <link rel=\"stylesheet\" href=\"https://fonts.googleapis.com/css?family=Roboto:400,500,700\" />\n" + " <link rel=\"stylesheet\" href=\"/assets/css/tiles.css?v=3eecd7b5b45a2b51c9acc74625c417d54a724854\" />\n" + " <link rel=\"stylesheet\" href=\"/assets/css/style.css?v=3eecd7b5b45a2b51c9acc74625c417d54a724854\" />\n\n" + " <title>\n" + " EPITA.it\n" + " \n" + " </title>\n\n" + " <!-- Global site tag (gtag.js) - Google Analytics -->\n" + " <script async src=\"https://www.googletagmanager.com/gtag/js?id=UA-140860210-2\"></script>\n" + " <script>\n" + " window.dataLayer = window.dataLayer || [];\n" + " function gtag(){dataLayer.push(arguments);}\n" + " gtag('js', new Date());\n\n" + " gtag('config', 'UA-140860210-2');\n" + " </script>\n\n" + "</head>\n" + "<body>\n\n" + " <div id=\"warn-invalid-modal\" class=\"modal\" tabindex=\"-1\" role=\"dialog\">\n" + " <div class=\"modal-dialog\" role=\"document\">\n" + " <div class=\"modal-content\">\n" + " <div class=\"modal-header\">\n" + " <h5 class=\"modal-title\"><i class=\"fas fa-exclamation-triangle fa-fw\"></i> The link to <b id=\"warn-invalid-brand\"></b> is invalid</h5>\n" + " <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\n" + " <span aria-hidden=\"true\">&times;</span>\n" + " </button>\n" + " </div>\n" + " <div class=\"modal-body\">\n" + " <p>Beware! This link has been tagged as invalid. This means:</p>\n" + " <ul>\n" + " <li>the link could be dead or broken</li>\n" + " <li>the link could have been taken over</li>\n" + " <li>the link could point to irrelevant information</li>\n" + " </ul>\n" + " <p>Do you really want to continue to <code id=\"warn-invalid-href\"></code>?</p>\n" + " </div>\n" + " <div class=\"modal-footer\">\n" + " <button type=\"button\" class=\"btn btn-secondary\" data-dismiss=\"modal\">Close</button>\n" + " <a id=\"warn-invalid-link\" class=\"btn btn-primary\" target=\"_blank\">Yes, continue anyway</a>\n" + " </div>\n" + " </div>\n" + " </div>\n" + " </div>\n\n" + " <nav id=\"navbar\" class=\"navbar navbar-expand-lg navbar-dark\">\n" + " <div class=\"container\">\n" + " <a class=\"navbar-brand\" href=\"/\">EPITA.it</a>\n" + " <button class=\"navbar-toggler\" type=\"button\" data-toggle=\"collapse\" data-target=\"#navbarNavAltMarkup\" aria-controls=\"navbarNavAltMarkup\" aria-expanded=\"false\" aria-label=\"Toggle navigation\">\n" + " <span class=\"navbar-toggler-icon\"></span>\n" + " </button>\n" + " <div class=\"collapse navbar-collapse\" id=\"navbarNavAltMarkup\">\n" + " <div class=\"navbar-nav mr-auto\">\n" + " \n" + " \n" + " <a class=\"nav-item nav-link\" href=\"/\">Home</a>\n" + " \n" + " \n" + " \n" + " <a class=\"nav-item nav-link\" href=\"/community\">Community</a>\n" + " \n" + " \n" + " \n" + " <a class=\"nav-item nav-link\" href=\"/docs\">Docs & Resources</a>\n" + " \n" + " \n" + " \n" + " <a class=\"nav-item nav-link\" href=\"/2022\">2022</a>\n" + " \n" + " \n" + " \n" + " <a class=\"nav-item nav-link\" href=\"/2023\">2023</a>\n" + " \n" + " \n" + " \n" + " <a class=\"nav-item nav-link\" href=\"/2024\">2024</a>\n" + " \n" + " \n" + " \n" + " <a class=\"nav-item nav-link\" href=\"/2025\">2025</a>\n" + " \n" + " \n" + " \n" + " <a class=\"nav-item nav-link\" href=\"/2026\">2026</a>\n" + " \n" + " \n" + " \n" + " <a class=\"nav-item nav-link\" href=\"/2027\">2027</a>\n" + " \n" + " \n" + " \n" + " <a class=\"nav-item nav-link\" href=\"/archive\">Archive</a>\n" + " \n" + " \n" + " </div>\n" + " <div class=\"navbar-nav\">\n" + " <a class=\"nav-item nav-link\" href=\"https://github.com/Epidocs/epita.it\"><i class=\"fas fa-code-branch fa-fw\"></i> Github</a>\n" + " <div class=\"nav-item dropdown\">\n" + " <a class=\"nav-link dropdown-toggle\" href=\"#\" id=\"navbarPlusDropdown\" data-toggle=\"dropdown\" aria-haspopup=\"true\" aria-expanded=\"false\"><i class=\"fas fa-plus fa-fw\"></i></a>\n" + " <div class=\"dropdown-menu dropdown-menu-right\" aria-labelledby=\"navbarPlusDropdown\">\n" + " \n" + " <a class=\"dropdown-item\" href=\"/about\">About</a>\n" + " \n" + " <a class=\"dropdown-item\" href=\"/legal\">Legal</a>\n" + " \n" + " <a class=\"dropdown-item\" href=\"/epidocs\">Epidocs Projects</a>\n" + " \n" + " </div>\n" + " </div>\n" + " </div>\n" + " </div>\n" + " </div>\n" + " </nav>\n\n" + " \n" + " <div id=\"newsline\">\n" + " <div class=\"container\">\n" + " <div class=\"carousel-item active\">\n" + " <i class=\"fas fa-folder-open fa-fw\"></i>\n" + " Showcase your S2 project on your school year group page! Contribute on the <a href=\"https://github.com/Epidocs/epita.it\">Github repository</a>!\n" + " </div>\n" + " <div class=\"carousel-item\" class=\"d-none\">\n" + " <i class=\"fas fa-book fa-fw\"></i>\n" + " Need to study for your exams? Check out <a href=\"https://past-exams.epidocs.eu/\">Past-Exams</a>!\n" + " </div>\n" + " <div id=\"addToHomeScreen\" class=\"d-none\">\n" + " <i class=\"fas fa-info-circle fa-fw\"></i>\n" + " <b>Add to your home screen</b> for easier access!\n" + " </div>\n" + " </div>\n" + " </div>\n" + " \n\n" + " <div id=\"main\">\n" + " <div class=\"container\">\n\n" + " <h1>EPITA.it</h1>\n" + "<p>Portal to services and projects related to EPITA.</p>\n\n\n" + " \n" + " \n" + " <h2>Official EPITA resources</h2>\n" + " \n\n" + " <div class=\"tiles-grid\">\n" + " \n" + " \n" + " \n\n" + " <a href=\"https://www.epita.fr/\" class=\"tile-wide\"\n" + " style=\"background-image: url(https://www.epita.fr/wp-content/themes/epita/assets/img/logo-epita.png);\n" + " background-color: #03374e; background-size: auto 90%\">\n" + " <span class=\"branding-bar\">EPITA.fr</span>\n\n" + " \n" + " </a>\n" + " \n" + " \n" + " \n" + " \n\n" + " <a href=\"https://epita.net/\" class=\"tile-medium\"\n" + " style=\"background-image: url(https://epita.net/Epita.png);\n" + " background-color: #223049; background-size: 90%\">\n" + " <span class=\"branding-bar\">EPITA.net</span>\n\n" + " \n" + " </a>\n" + " \n" + " \n" + " \n" + " \n\n" + " <a href=\"http://intracom.epita.fr/\" class=\"tile-medium\"\n" + " style=\"background-image: url(https://cdn.matiboux.com/images/epita.it/intracom.png);\n" + " background-color: #ff6f00; background-size: 90%; background-position-y: 25%\">\n" + " <span class=\"branding-bar\">Intracom</span>\n\n" + " \n" + " </a>\n" + " \n" + " \n" + " \n" + " \n\n" + " <a href=\"https://epitafr.sharepoint.com/sites/EPITAStudyAbroad\" class=\"tile-small-wide text-dark\"\n" + " style=\"background-image: url(https://www.epita.fr/wp-content/themes/epita/assets/img/logo-epita.png);\n" + " background-color: #fff; background-size: auto 75%; background-position-x: 90%; background-position-y: 25%\">\n" + " <span class=\"branding-bar\">Study Abroad</span>\n\n" + " \n" + " </a>\n" + " \n" + " \n" + " \n" + " \n\n" + " <a href=\"http://odyssee.epita.fr/\" class=\"tile-small-wide text-dark\"\n" + " style=\"background-image: url(https://cdn.matiboux.com/images/epita.it/odyssee.jpg);\n" + " background-color: #fff; background-size: auto 75%; background-position-x: 90%; background-position-y: 25%\">\n" + " <span class=\"branding-bar\">Odyssée</span>\n\n" + " \n" + " </a>\n" + " \n" + " \n" + "</div>\n\n\n" + " <hr />\n" + " \n" + " \n" + " \n" + " <h2>Official resources for students</h2>\n" + " \n\n" + " <div class=\"tiles-grid\">\n" + " \n" + " \n" + " \n\n" + " <a href=\"https://cri.epita.fr/\" class=\"tile-medium text-dark\"\n" + " style=\"background-image: url(https://s3.cri.epita.fr/cri-intranet/img/logo.png);\n" + " background-color: #fff; background-size: 75%; background-position-y: 20%\">\n" + " <span class=\"branding-bar\">CRI EPITA</span>\n\n" + " \n" + " </a>\n" + " \n" + " \n" + " \n" + " \n\n" + " <a href=\"https://moodle.cri.epita.fr/\" class=\"tile-medium text-dark\"\n" + " style=\"background-image: url(https://moodle.org/theme/image.php/moodleorg/theme_moodleorg/1594982425/moodle_logo_small);\n" + " background-color: #fff; background-position-y: 45%; background-size: 90%\">\n" + " <span class=\"branding-bar\">Moodle</span>\n\n" + " \n" + " </a>\n" + " \n" + " \n" + " \n" + " \n\n" + " <a href=\"https://ionisx.com/\" class=\"tile-medium text-dark\"\n" + " style=\"background-image: url(https://cdn.ionisx.com/images/logoIONISx.a4f6bdf1.png);\n" + " background-color: #d09c01; background-size: 90%\">\n" + " <span class=\"branding-bar\">IonisX</span>\n\n" + " \n" + " </a>\n" + " \n" + " \n" + " \n" + " \n\n" + " <a href=\"https://assistants.epita.fr/\" class=\"tile-medium\"\n" + " style=\"background-image: url(https://assistants.epita.fr/logos/yaka2023_logo.svg), url(https://assistants.epita.fr/lightnoise.png);\n" + " background-color: #001f07; background-position-y: top; background-size: auto 90%, auto; background-repeat: no-repeat, repeat\">\n" + " <span class=\"branding-bar\">Assistants</span>\n\n" + " \n" + " </a>\n" + " \n" + " \n" + " \n" + " \n\n" + " <a href=\"https://www.office.com/?auth=2\" class=\"tile-small-wide\"\n" + " style=\"background-image: url(https://3er1viui9wo30pkxh1v2nh4w-wpengine.netdna-ssl.com/wp-content/uploads/prod/sites/113/2016/02/OfcLogoText-768x331.jpg);\n" + " background-color: #ea3c00; background-size: 90%; background-position-y: top\">\n" + " <span class=\"branding-bar\">Office</span>\n\n" + " \n" + " </a>\n" + " \n" + " \n" + " \n" + " \n\n" + " <a href=\"http://rocketchat.cri.epita.fr/\" class=\"tile-small-wide\"\n" + " style=\"background-image: url(https://rocketchat.cri.epita.fr/assets/logo.png);\n" + " background-color: #444; background-size: 90%; background-position-y: 25%\">\n" + " <span class=\"branding-bar\">Rocket.Chat</span>\n\n" + " \n" + " </a>\n" + " \n" + " \n" + " \n" + " \n\n" + " <a href=\"https://zeus.3ie.fr/\" class=\"tile-small-wide\"\n" + " style=\"background-image: url(https://zeus.3ie.fr/assets/png/logo-zeus-blanc.png);\n" + " background-color: #1d2e37; background-size: auto; background-position-y: 25%\">\n" + " <span class=\"branding-bar\">Zeus</span>\n\n" + " \n" + " </a>\n" + " \n" + " \n" + " \n" + " \n\n" + " <a href=\"https://gitlab.cri.epita.fr/\" class=\"tile-small-wide\"\n" + " style=\"background-image: url(https://about.gitlab.com/images/press/logo/svg/gitlab-logo-white-rgb.svg);\n" + " background-color: #292961; background-position-y: top; background-size: 75%\">\n" + " <span class=\"branding-bar\">Gitlab CRI</span>\n\n" + " \n" + " </a>\n" + " \n" + " \n" + " \n" + " \n\n" + " <a href=\"/debugpro\" class=\"tile-small-wide text-dark\"\n" + " style=\";\n" + " background-color: #f5f5ff\">\n" + " <span class=\"branding-bar\">Debug-Pro</span>\n\n" + " \n" + " </a>\n" + " \n" + " \n" + " \n" + " \n\n" + " <a href=\"https://wiki-prog.infoprepa.epita.fr/index.php/EPITA:Programmation\" class=\"tile-small-wide text-dark\"\n" + " style=\";\n" + " background-color: #f6f6f6\">\n" + " <span class=\"branding-bar\">Wiki Prog</span>\n\n" + " \n" + " </a>\n" + " \n" + " \n" + " \n" + " \n\n" + " <a href=\"https://algo.infoprepa.epita.fr/index.php/Epita:Algo:Cours\" class=\"tile-small-wide text-dark\"\n" + " style=\"background-image: url(https://algo.infoprepa.epita.fr/skins/common/images/Algo_prepas_epita_wiki_logo.png);\n" + " background-color: #fff; background-position: 50% 15%; background-size: 50%\">\n" + " <span class=\"branding-bar\">Algo Cours (FR)</span>\n\n" + " \n" + " </a>\n" + " \n" + " \n" + " \n" + " \n\n" + " <a href=\"https://algo.infoprepa.epita.fr/english/index.php/Epita:Algo:Course\" class=\"tile-small-wide text-dark\"\n" + " style=\"background-image: url(https://algo.infoprepa.epita.fr/skins/common/images/Algo_prepas_epita_wiki_logo.png);\n" + " background-color: #fff; background-position: 50% 15%; background-size: 50%\">\n" + " <span class=\"branding-bar\">Algo Courses (EN)</span>\n\n" + " \n" + " </a>\n" + " \n" + " \n" + " \n" + " \n\n" + " <a href=\"https://prepa-epita.helvetius.net/pegasus\" class=\"tile-small-wide text-dark\"\n" + " style=\"background-image: url(https://is2-ssl.mzstatic.com/image/thumb/Purple113/v4/a4/23/f4/a423f466-ad1d-7071-9b75-0079f744a72a/source/70x70bb.jpg);\n" + " background-color: #fff; background-position-x: left\">\n" + " <span class=\"branding-bar\">Pegasus Prepa</span>\n\n" + " \n" + " </a>\n" + " \n" + " \n" + " \n" + " \n\n" + " <a href=\"https://inge-etud.epita.net/pegasus/\" class=\"tile-small-wide text-dark\"\n" + " style=\"background-image: url(https://is2-ssl.mzstatic.com/image/thumb/Purple113/v4/a4/23/f4/a423f466-ad1d-7071-9b75-0079f744a72a/source/70x70bb.jpg);\n" + " background-color: #fff; background-position-x: left\">\n" + " <span class=\"branding-bar\">Pegasus Ing</span>\n\n" + " \n" + " </a>\n" + " \n" + " \n" + " \n" + " \n\n" + " <a href=\"https://www.projet-voltaire.fr/\" class=\"tile-small-wide text-dark\"\n" + " style=\"background-image: url(https://www.projet-voltaire.fr/pv-wp/wp-content/uploads/2016/09/logo-projet-voltaire-nav.png);\n" + " background-color: #a2d416; background-size: auto 90%; background-position-x: right\">\n" + " <span class=\"branding-bar\">Projet Voltaire</span>\n\n" + " \n" + " </a>\n" + " \n" + " \n" + " \n" + " \n\n" + " <a href=\"https://he2.tellmemorecampus.com/\" class=\"tile-small-wide\"\n" + " style=\"background-image: url(https://resources.rosettastone.com/assets/ss/221270--8920100/App_Themes/Default/Global/0101UnidentifiedHomePage/Images/r/logo_RS.png);\n" + " background-color: #262a2f; background-size: 90%; background-position-y: 25%\">\n" + " <span class=\"branding-bar\">Rosetta Stone</span>\n\n" + " \n" + " </a>\n" + " \n" + " \n" + "</div>\n\n\n" + " <hr />\n" + " \n" + " \n" + " \n" + " <h2>Unofficial resources for students</h2>\n" + " <p class=\"small\"><i class=\"fas fa-user-friends fa-fw\"></i> = Community resource, not affiliated with EPITA. <br />\n" + "<i class=\"fas fa-bullhorn fa-fw\"></i> = Client for reading newsgroups, not affiliated with EPITA.\n" + "</p>\n\n" + " <div class=\"tiles-grid\">\n" + " \n" + " \n" + " \n\n" + " <a href=\"https://epimap.fr/\" class=\"tile-small-wide\"\n" + " style=\"background-image: url(https://epimap.fr/img/logo-epimap.svg);\n" + " background-color: #230071; background-size: 80%; background-position: 20% 20%\">\n" + " <span class=\"branding-bar\">Map EPITA</span>\n\n" + " \n" + " <span class=\"branding-icon\"><i class=\"fas fa-user-friends fa-fw\"></i></span>\n" + " \n" + " </a>\n" + " \n" + " \n" + " \n" + " \n\n" + " <a href=\"https://news.deliciousmuffins.net/\" class=\"tile-small-wide\"\n" + " style=\"background-image: url(https://news.deliciousmuffins.net/static/muffinreader.png);\n" + " background-color: #222222\">\n" + " <span class=\"branding-bar\">Muffin Reader</span>\n\n" + " \n" + " <span class=\"branding-icon\"><i class=\"fas fa-bullhorn fa-fw\"></i></span>\n" + " \n" + " </a>\n" + " \n" + " \n" + " \n" + " \n\n" + " <a href=\"https://rtfn.fr/\" class=\"tile-small-wide text-dark invalid\"\n" + " style=\";\n" + " background-color: #fff\">\n" + " <span class=\"branding-bar\">RTFN</span>\n\n" + " \n" + " <span class=\"branding-icon\"><i class=\"fas fa-bullhorn fa-fw\"></i></span>\n" + " \n" + " </a>\n" + " \n" + " \n" + " \n" + " \n\n" + " <a href=\"https://backtobasics.axen.io/\" class=\"tile-medium text-dark invalid\"\n" + " style=\"background-image: url(https://backtobasics.axen.io/static/img/favicon.png);\n" + " background-color: #fff; background-size: 90%; background-position-y: top\">\n" + " <span class=\"branding-bar\">Back to Basics</span>\n\n" + " \n" + " </a>\n" + " \n" + " \n" + " \n" + " \n\n" + " <a href=\"https://past-exams.epidocs.eu/\" class=\"tile-medium\"\n" + " style=\"background-image: url(https://epidocs.eu/assets/logo.png);\n" + " background-color: #24292e; background-size: 90%\">\n" + " <span class=\"branding-bar\">Past-Exams</span>\n\n" + " \n" + " <span class=\"branding-icon\"><i class=\"fas fa-user-friends fa-fw\"></i></span>\n" + " \n" + " </a>\n" + " \n" + " \n" + " \n" + " \n\n" + " <a href=\"https://www.epitaf.fr/\" class=\"tile-medium\"\n" + " style=\"background-image: url(https://www.epitaf.fr/logo.png);\n" + " background-color: #141d27\">\n" + " <span class=\"branding-bar\">Epitaf</span>\n\n" + " \n" + " <span class=\"branding-icon\"><i class=\"fas fa-user-friends fa-fw\"></i></span>\n" + " \n" + " </a>\n" + " \n" + " \n" + " \n" + " \n\n" + " <a href=\"https://epitar.aureleoules.com\" class=\"tile-medium\"\n" + " style=\"background-image: url(https://epitar.aureleoules.com/favicon.png);\n" + " background-color: #141d27\">\n" + " <span class=\"branding-bar\">Epitar</span>\n\n" + " \n" + " <span class=\"branding-icon\"><i class=\"fas fa-user-friends fa-fw\"></i></span>\n" + " \n" + " </a>\n" + " \n" + " \n" + " \n" + " \n\n" + " <a href=\"https://epinotes.fr/\" class=\"tile-medium\"\n" + " style=\"background-image: url(https://epinotes.fr/public/images/logos/epinotes_logo_7.png);\n" + " background-color: #131415; background-size: 90%\">\n" + " <span class=\"branding-bar\">Epinotes</span>\n\n" + " \n" + " <span class=\"branding-icon\"><i class=\"fas fa-user-friends fa-fw\"></i></span>\n" + " \n" + " </a>\n" + " \n" + " \n" + " \n" + " \n\n" + " <a href=\"https://annales.hyperion.tf/\" class=\"tile-small-wide text-dark\"\n" + " style=\"background-image: url(https://static.hyperion.tf/hyperion/img/favicon.ico);\n" + " background-color: #eee; background-size: auto 40%; background-position: 95% 85%\">\n" + " <span class=\"branding-bar\">HyperAnnales</span>\n\n" + " \n" + " <span class=\"branding-icon\"><i class=\"fas fa-user-friends fa-fw\"></i></span>\n" + " \n" + " </a>\n" + " \n" + " \n" + " \n" + " \n\n" + " <a href=\"http://mastercorp.epita.eu/\" class=\"tile-small-wide text-dark\"\n" + " style=\";\n" + " background-color: #fff\">\n" + " <span class=\"branding-bar\">Mastercorp</span>\n\n" + " \n" + " <span class=\"branding-icon\"><i class=\"fas fa-user-friends fa-fw\"></i></span>\n" + " \n" + " </a>\n" + " \n" + " \n" + "</div>\n\n\n" + " <hr />\n" + " \n" + " \n" + " \n" + " <h2>Other links</h2>\n" + " \n\n" + " <div class=\"tiles-grid\">\n" + " \n" + " \n" + " \n\n" + " <a href=\"https://console.bocal.org/\" class=\"tile-small-wide text-dark\"\n" + " style=\";\n" + " background-color: #e7e7e7\">\n" + " <span class=\"branding-bar\">Console Bocal</span>\n\n" + " \n" + " </a>\n" + " \n" + " \n" + " \n" + " \n\n" + " <a href=\"https://logement.epita.fr/\" class=\"tile-small-wide text-dark\"\n" + " style=\"background-image: url(&quot;data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 180 38'%3E%3Cpath fill='%23000' fill-rule='evenodd' d='M21.121.776l21.104 21.029-2.578 2.568-3.238-3.226v.846c0 8.404-6.862 15.243-15.296 15.243-8.33 0-15.125-6.669-15.294-14.928l-.003-.315v-.846l-3.238 3.226L0 21.805l9.429-9.396V5.124h3.606v3.692l8.068-8.04.01.009.008-.009zm-.008 5.128L9.422 17.554v4.44c0 6.423 5.244 11.649 11.69 11.649 6.347 0 11.53-5.067 11.688-11.354l.004-.296v-4.439L21.113 5.904zm114.415 7.56c3.952 0 6.838 3.219 6.838 7.761 0 4.572-2.886 7.792-6.838 7.792-2.222 0-4.011-1.006-5.193-2.703v7.303h-3.521v-19.81h3.52v2.359c1.183-1.697 2.972-2.703 5.194-2.703zM28.192 21.658v.855c0 3.89-3.176 7.054-7.08 7.054a7.112 7.112 0 01-6.13-3.524l3.12-1.8a3.492 3.492 0 003.01 1.731 3.472 3.472 0 003.475-3.461v-.855h3.605zm135.958-.491v7.504h-3.52V13.807h3.52v2.876c.928-1.93 2.783-2.827 5.143-2.874v-.001l.195-.001h1.97v-4.08h3.432v4.08h3.376v2.905h-3.376v7.59c0 1.006.635 1.725 1.472 1.725.606 0 1.154-.23 1.472-.547l1.01 2.358c-.837.718-2.05 1.179-3.174 1.179-2.482 0-4.213-1.782-4.213-4.284v-8.021h-2.033l-.193.003c-3.06.086-5.08 1.712-5.08 4.453zM70.433 9.726v4.081h3.376v2.905h-3.376v7.59c0 1.006.635 1.725 1.471 1.725.607 0 1.154-.23 1.472-.547l1.01 2.358c-.837.719-2.049 1.179-3.174 1.179-2.481 0-4.212-1.782-4.212-4.284V9.726h3.433zm80.748 3.737c3.953 0 6.405 2.501 6.405 6.268v8.94h-3.434V26.89c-1.095 1.38-2.971 2.127-4.703 2.127-3.173 0-5.568-1.87-5.568-4.745 0-2.931 2.74-4.944 6.088-4.944 1.356 0 2.827.288 4.183.805v-.402c0-1.726-.952-3.393-3.664-3.393-1.414 0-2.77.489-4.039 1.121l-1.212-2.443c2.106-1.035 4.068-1.553 5.944-1.553zm-33.817 0c3.953 0 6.405 2.501 6.405 6.268v8.94h-3.433V26.89c-1.096 1.38-2.972 2.127-4.703 2.127-3.174 0-5.569-1.87-5.569-4.745 0-2.931 2.741-4.944 6.088-4.944 1.356 0 2.827.288 4.184.805v-.402c0-1.726-.953-3.393-3.664-3.393-1.415 0-2.77.489-4.04 1.121l-1.212-2.443c2.107-1.035 4.069-1.553 5.944-1.553zm-37.74.344v8.77c0 2.012 1.299 3.45 3.145 3.45 1.847 0 3.376-1.236 3.607-2.817v-9.403h3.52v14.865h-3.52v-1.985c-.923 1.381-2.655 2.33-4.617 2.33-3.26 0-5.54-2.386-5.54-5.75v-9.46h3.406zm28.146-5.231v20.096h-3.52v-2.3c-1.183 1.668-2.971 2.645-5.164 2.645-3.953 0-6.838-3.22-6.838-7.792 0-4.542 2.885-7.762 6.838-7.762 2.193 0 3.981.977 5.164 2.645V8.576h3.52zm-50.49-.028c3.145 0 5.512 1.063 7.502 2.76l-1.962 2.644c-1.731-1.495-3.722-2.328-5.683-2.328-1.991 0-3.348 1.207-3.348 2.586 0 1.61 1.472 2.186 4.617 2.905 4.126.92 6.896 2.242 6.896 5.836 0 3.536-2.713 6.037-7.445 6.037-3.404 0-6.29-1.15-8.482-3.192l2.077-2.558c1.818 1.638 3.924 2.674 6.52 2.674 2.453 0 3.723-1.207 3.723-2.617 0-1.638-1.414-2.184-4.587-2.932-4.098-.949-6.954-2.128-6.954-5.836 0-3.45 2.943-5.98 7.127-5.98zm59.392 13.223c-1.76 0-3.175.978-3.175 2.387s1.241 2.3 2.915 2.3c1.702 0 3.519-.863 3.924-2.444v-1.667c-1.096-.374-2.337-.576-3.664-.576zm33.816 0c-1.76 0-3.173.978-3.173 2.387s1.24 2.3 2.913 2.3c1.702 0 3.52-.863 3.924-2.444v-1.667c-1.095-.374-2.336-.576-3.664-.576zm-15.913-5.318c-2.48 0-4.212 1.983-4.212 4.772s1.731 4.802 4.212 4.802c2.511 0 4.3-2.013 4.3-4.802 0-2.789-1.789-4.772-4.3-4.772zm-34.538 0c-2.51 0-4.298 1.983-4.298 4.772s1.789 4.802 4.298 4.802c2.482 0 4.213-2.013 4.213-4.802 0-2.789-1.73-4.772-4.213-4.772z'%3E%3C/path%3E%3C/svg%3E&quot;\n" + ");\n" + " background-color: #fff; background-size: 90%; background-position-y: 30%\">\n" + " <span class=\"branding-bar\">EPITA Studapart</span>\n\n" + " \n" + " </a>\n" + " \n" + " \n" + " \n" + " \n\n" + " <a href=\"https://www.lse.epita.fr/\" class=\"tile-small-wide\"\n" + " style=\"background-image: url(https://www.lse.epita.fr/images/logoLSE.png);\n" + " background-color: #141212; background-size: auto 80%; background-position-x: 75%\">\n" + " <span class=\"branding-bar\">LSE</span>\n\n" + " \n" + " </a>\n" + " \n" + " \n" + " \n" + " \n\n" + " <a href=\"https://www.lrde.epita.fr/\" class=\"tile-small-wide text-dark\"\n" + " style=\"background-image: url(https://www.lrde.epita.fr/skins/common/images/logo.png);\n" + " background-color: #d5e6f7; background-position-x: right\">\n" + " <span class=\"branding-bar\">LRDE</span>\n\n" + " \n" + " </a>\n" + " \n" + " \n" + " \n" + " \n\n" + " <a href=\"https://www.3ie.fr/\" class=\"tile-small-wide\"\n" + " style=\"background-image: url(https://www.3ie.fr/images/3ie-logo.svg);\n" + " background-color: #00ffd2; background-size: auto 90%\">\n" + " <span class=\"branding-bar\">3ie</span>\n\n" + " \n" + " </a>\n" + " \n" + " \n" + "</div>\n\n\n" + " \n" + " \n" + " \n\n\n\n\n" + " </div>\n" + " </div>\n\n" + " <div id=\"footer\">\n" + " <div class=\"container\">\n" + " <p>\n" + " Made with <i class=\"fas fa-heart fa-fw text-danger\"></i> by EPITA students.\n" + " <a href=\"https://github.com/Epidocs/epita.it#license\">\n" + " <img alt=\"CC BY-NC 4.0\" src=\"https://mirrors.creativecommons.org/presskit/buttons/80x15/svg/by-nc.svg\" />\n" + " </a> <br />\n" + " We use cookies for analytics purposes.\n" + " </p>\n" + " <ul>\n" + " <li><a href=\"https://github.com/Epidocs/epita.it\" class=\"btn btn-primary btn-sm\">Contribuez sur Github</a></li>\n" + " <li><a href=\"https://epidocs.eu/\" class=\"btn btn-info btn-sm\">Géré par Epidocs</a></li>\n" + " <!-- <li><a href=\"/tos.html\" class=\"btn btn-primary btn-sm\">Conditions générales</a></li> -->\n" + " </ul>\n" + " </div>\n" + " </div>\n\n" + " <script src=\"https://code.jquery.com/jquery-3.4.1.slim.min.js\" integrity=\"sha256-pasqAKBDmFT4eHoN2ndd6lN370kFiGUFyTiUHWhU7k8=\" crossorigin=\"anonymous\"></script>\n" + " <script src=\"https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js\" integrity=\"sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1\" crossorigin=\"anonymous\"></script>\n" + " <script src=\"https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js\" integrity=\"sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM\" crossorigin=\"anonymous\"></script>\n" + " <script src=\"/assets/js/script.js?v=3eecd7b5b45a2b51c9acc74625c417d54a724854\"></script>\n\n" + "</body>\n" + "</html>\n"; final Pattern pattern = Pattern.compile(regex, Pattern.MULTILINE); 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