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

$re = '/>[^A-Za-z0-9<]*(\w[^<]*?)[^A-Za-z0-9<]*</m'; $str = ' <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="title" content="EPITA.it" /> <meta name="description" content="Portail vers des services en lien avec l\'EPITA" /> <meta name="keywords" content="Epidocs, portail, portal, open, source, open-source, services, sites, internet, website, , documents, utiles, useful, étudiants, students, EPITA" /> <meta name="author" content="Matiboux" /> <link rel="icon" sizes="48x48" href="/assets/icon-48.png?v=3eecd7b5b45a2b51c9acc74625c417d54a724854" /> <link rel="icon" sizes="192x192" href="/assets/icon-192.png?v=3eecd7b5b45a2b51c9acc74625c417d54a724854" /> <link rel="icon" sizes="512x512" href="/assets/icon-512.png?v=3eecd7b5b45a2b51c9acc74625c417d54a724854" /> <link rel="apple-touch-icon" href="/assets/apple-icon.png?v=3eecd7b5b45a2b51c9acc74625c417d54a724854" /> <link rel="manifest" href="/manifest.json" /> <meta name="theme-color" content="#183048" /> <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.2/css/all.css" /> <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" /> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:400,500,700" /> <link rel="stylesheet" href="/assets/css/tiles.css?v=3eecd7b5b45a2b51c9acc74625c417d54a724854" /> <link rel="stylesheet" href="/assets/css/style.css?v=3eecd7b5b45a2b51c9acc74625c417d54a724854" /> <title> EPITA.it </title> <!-- Global site tag (gtag.js) - Google Analytics --> <script async src="https://www.googletagmanager.com/gtag/js?id=UA-140860210-2"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag(\'js\', new Date()); gtag(\'config\', \'UA-140860210-2\'); </script> </head> <body> <div id="warn-invalid-modal" class="modal" tabindex="-1" role="dialog"> <div class="modal-dialog" role="document"> <div class="modal-content"> <div class="modal-header"> <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> <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">&times;</span> </button> </div> <div class="modal-body"> <p>Beware! This link has been tagged as invalid. This means:</p> <ul> <li>the link could be dead or broken</li> <li>the link could have been taken over</li> <li>the link could point to irrelevant information</li> </ul> <p>Do you really want to continue to <code id="warn-invalid-href"></code>?</p> </div> <div class="modal-footer"> <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button> <a id="warn-invalid-link" class="btn btn-primary" target="_blank">Yes, continue anyway</a> </div> </div> </div> </div> <nav id="navbar" class="navbar navbar-expand-lg navbar-dark"> <div class="container"> <a class="navbar-brand" href="/">EPITA.it</a> <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavAltMarkup" aria-controls="navbarNavAltMarkup" aria-expanded="false" aria-label="Toggle navigation"> <span class="navbar-toggler-icon"></span> </button> <div class="collapse navbar-collapse" id="navbarNavAltMarkup"> <div class="navbar-nav mr-auto"> <a class="nav-item nav-link" href="/">Home</a> <a class="nav-item nav-link" href="/community">Community</a> <a class="nav-item nav-link" href="/docs">Docs & Resources</a> <a class="nav-item nav-link" href="/2022">2022</a> <a class="nav-item nav-link" href="/2023">2023</a> <a class="nav-item nav-link" href="/2024">2024</a> <a class="nav-item nav-link" href="/2025">2025</a> <a class="nav-item nav-link" href="/2026">2026</a> <a class="nav-item nav-link" href="/2027">2027</a> <a class="nav-item nav-link" href="/archive">Archive</a> </div> <div class="navbar-nav"> <a class="nav-item nav-link" href="https://github.com/Epidocs/epita.it"><i class="fas fa-code-branch fa-fw"></i> Github</a> <div class="nav-item dropdown"> <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> <div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarPlusDropdown"> <a class="dropdown-item" href="/about">About</a> <a class="dropdown-item" href="/legal">Legal</a> <a class="dropdown-item" href="/epidocs">Epidocs Projects</a> </div> </div> </div> </div> </div> </nav> <div id="newsline"> <div class="container"> <div class="carousel-item active"> <i class="fas fa-folder-open fa-fw"></i> Showcase your S2 project on your school year group page! Contribute on the <a href="https://github.com/Epidocs/epita.it">Github repository</a>! </div> <div class="carousel-item" class="d-none"> <i class="fas fa-book fa-fw"></i> Need to study for your exams? Check out <a href="https://past-exams.epidocs.eu/">Past-Exams</a>! </div> <div id="addToHomeScreen" class="d-none"> <i class="fas fa-info-circle fa-fw"></i> <b>Add to your home screen</b> for easier access! </div> </div> </div> <div id="main"> <div class="container"> <h1>EPITA.it</h1> <p>Portal to services and projects related to EPITA.</p> <h2>Official EPITA resources</h2> <div class="tiles-grid"> <a href="https://www.epita.fr/" class="tile-wide" style="background-image: url(https://www.epita.fr/wp-content/themes/epita/assets/img/logo-epita.png); background-color: #03374e; background-size: auto 90%"> <span class="branding-bar">EPITA.fr</span> </a> <a href="https://epita.net/" class="tile-medium" style="background-image: url(https://epita.net/Epita.png); background-color: #223049; background-size: 90%"> <span class="branding-bar">EPITA.net</span> </a> <a href="http://intracom.epita.fr/" class="tile-medium" style="background-image: url(https://cdn.matiboux.com/images/epita.it/intracom.png); background-color: #ff6f00; background-size: 90%; background-position-y: 25%"> <span class="branding-bar">Intracom</span> </a> <a href="https://epitafr.sharepoint.com/sites/EPITAStudyAbroad" class="tile-small-wide text-dark" style="background-image: url(https://www.epita.fr/wp-content/themes/epita/assets/img/logo-epita.png); background-color: #fff; background-size: auto 75%; background-position-x: 90%; background-position-y: 25%"> <span class="branding-bar">Study Abroad</span> </a> <a href="http://odyssee.epita.fr/" class="tile-small-wide text-dark" style="background-image: url(https://cdn.matiboux.com/images/epita.it/odyssee.jpg); background-color: #fff; background-size: auto 75%; background-position-x: 90%; background-position-y: 25%"> <span class="branding-bar">Odyssée</span> </a> </div> <hr /> <h2>Official resources for students</h2> <div class="tiles-grid"> <a href="https://cri.epita.fr/" class="tile-medium text-dark" style="background-image: url(https://s3.cri.epita.fr/cri-intranet/img/logo.png); background-color: #fff; background-size: 75%; background-position-y: 20%"> <span class="branding-bar">CRI EPITA</span> </a> <a href="https://moodle.cri.epita.fr/" class="tile-medium text-dark" style="background-image: url(https://moodle.org/theme/image.php/moodleorg/theme_moodleorg/1594982425/moodle_logo_small); background-color: #fff; background-position-y: 45%; background-size: 90%"> <span class="branding-bar">Moodle</span> </a> <a href="https://ionisx.com/" class="tile-medium text-dark" style="background-image: url(https://cdn.ionisx.com/images/logoIONISx.a4f6bdf1.png); background-color: #d09c01; background-size: 90%"> <span class="branding-bar">IonisX</span> </a> <a href="https://assistants.epita.fr/" class="tile-medium" style="background-image: url(https://assistants.epita.fr/logos/yaka2023_logo.svg), url(https://assistants.epita.fr/lightnoise.png); background-color: #001f07; background-position-y: top; background-size: auto 90%, auto; background-repeat: no-repeat, repeat"> <span class="branding-bar">Assistants</span> </a> <a href="https://www.office.com/?auth=2" class="tile-small-wide" style="background-image: url(https://3er1viui9wo30pkxh1v2nh4w-wpengine.netdna-ssl.com/wp-content/uploads/prod/sites/113/2016/02/OfcLogoText-768x331.jpg); background-color: #ea3c00; background-size: 90%; background-position-y: top"> <span class="branding-bar">Office</span> </a> <a href="http://rocketchat.cri.epita.fr/" class="tile-small-wide" style="background-image: url(https://rocketchat.cri.epita.fr/assets/logo.png); background-color: #444; background-size: 90%; background-position-y: 25%"> <span class="branding-bar">Rocket.Chat</span> </a> <a href="https://zeus.3ie.fr/" class="tile-small-wide" style="background-image: url(https://zeus.3ie.fr/assets/png/logo-zeus-blanc.png); background-color: #1d2e37; background-size: auto; background-position-y: 25%"> <span class="branding-bar">Zeus</span> </a> <a href="https://gitlab.cri.epita.fr/" class="tile-small-wide" style="background-image: url(https://about.gitlab.com/images/press/logo/svg/gitlab-logo-white-rgb.svg); background-color: #292961; background-position-y: top; background-size: 75%"> <span class="branding-bar">Gitlab CRI</span> </a> <a href="/debugpro" class="tile-small-wide text-dark" style="; background-color: #f5f5ff"> <span class="branding-bar">Debug-Pro</span> </a> <a href="https://wiki-prog.infoprepa.epita.fr/index.php/EPITA:Programmation" class="tile-small-wide text-dark" style="; background-color: #f6f6f6"> <span class="branding-bar">Wiki Prog</span> </a> <a href="https://algo.infoprepa.epita.fr/index.php/Epita:Algo:Cours" class="tile-small-wide text-dark" style="background-image: url(https://algo.infoprepa.epita.fr/skins/common/images/Algo_prepas_epita_wiki_logo.png); background-color: #fff; background-position: 50% 15%; background-size: 50%"> <span class="branding-bar">Algo Cours (FR)</span> </a> <a href="https://algo.infoprepa.epita.fr/english/index.php/Epita:Algo:Course" class="tile-small-wide text-dark" style="background-image: url(https://algo.infoprepa.epita.fr/skins/common/images/Algo_prepas_epita_wiki_logo.png); background-color: #fff; background-position: 50% 15%; background-size: 50%"> <span class="branding-bar">Algo Courses (EN)</span> </a> <a href="https://prepa-epita.helvetius.net/pegasus" class="tile-small-wide text-dark" style="background-image: url(https://is2-ssl.mzstatic.com/image/thumb/Purple113/v4/a4/23/f4/a423f466-ad1d-7071-9b75-0079f744a72a/source/70x70bb.jpg); background-color: #fff; background-position-x: left"> <span class="branding-bar">Pegasus Prepa</span> </a> <a href="https://inge-etud.epita.net/pegasus/" class="tile-small-wide text-dark" style="background-image: url(https://is2-ssl.mzstatic.com/image/thumb/Purple113/v4/a4/23/f4/a423f466-ad1d-7071-9b75-0079f744a72a/source/70x70bb.jpg); background-color: #fff; background-position-x: left"> <span class="branding-bar">Pegasus Ing</span> </a> <a href="https://www.projet-voltaire.fr/" class="tile-small-wide text-dark" style="background-image: url(https://www.projet-voltaire.fr/pv-wp/wp-content/uploads/2016/09/logo-projet-voltaire-nav.png); background-color: #a2d416; background-size: auto 90%; background-position-x: right"> <span class="branding-bar">Projet Voltaire</span> </a> <a href="https://he2.tellmemorecampus.com/" class="tile-small-wide" style="background-image: url(https://resources.rosettastone.com/assets/ss/221270--8920100/App_Themes/Default/Global/0101UnidentifiedHomePage/Images/r/logo_RS.png); background-color: #262a2f; background-size: 90%; background-position-y: 25%"> <span class="branding-bar">Rosetta Stone</span> </a> </div> <hr /> <h2>Unofficial resources for students</h2> <p class="small"><i class="fas fa-user-friends fa-fw"></i> = Community resource, not affiliated with EPITA. <br /> <i class="fas fa-bullhorn fa-fw"></i> = Client for reading newsgroups, not affiliated with EPITA. </p> <div class="tiles-grid"> <a href="https://epimap.fr/" class="tile-small-wide" style="background-image: url(https://epimap.fr/img/logo-epimap.svg); background-color: #230071; background-size: 80%; background-position: 20% 20%"> <span class="branding-bar">Map EPITA</span> <span class="branding-icon"><i class="fas fa-user-friends fa-fw"></i></span> </a> <a href="https://news.deliciousmuffins.net/" class="tile-small-wide" style="background-image: url(https://news.deliciousmuffins.net/static/muffinreader.png); background-color: #222222"> <span class="branding-bar">Muffin Reader</span> <span class="branding-icon"><i class="fas fa-bullhorn fa-fw"></i></span> </a> <a href="https://rtfn.fr/" class="tile-small-wide text-dark invalid" style="; background-color: #fff"> <span class="branding-bar">RTFN</span> <span class="branding-icon"><i class="fas fa-bullhorn fa-fw"></i></span> </a> <a href="https://backtobasics.axen.io/" class="tile-medium text-dark invalid" style="background-image: url(https://backtobasics.axen.io/static/img/favicon.png); background-color: #fff; background-size: 90%; background-position-y: top"> <span class="branding-bar">Back to Basics</span> </a> <a href="https://past-exams.epidocs.eu/" class="tile-medium" style="background-image: url(https://epidocs.eu/assets/logo.png); background-color: #24292e; background-size: 90%"> <span class="branding-bar">Past-Exams</span> <span class="branding-icon"><i class="fas fa-user-friends fa-fw"></i></span> </a> <a href="https://www.epitaf.fr/" class="tile-medium" style="background-image: url(https://www.epitaf.fr/logo.png); background-color: #141d27"> <span class="branding-bar">Epitaf</span> <span class="branding-icon"><i class="fas fa-user-friends fa-fw"></i></span> </a> <a href="https://epitar.aureleoules.com" class="tile-medium" style="background-image: url(https://epitar.aureleoules.com/favicon.png); background-color: #141d27"> <span class="branding-bar">Epitar</span> <span class="branding-icon"><i class="fas fa-user-friends fa-fw"></i></span> </a> <a href="https://epinotes.fr/" class="tile-medium" style="background-image: url(https://epinotes.fr/public/images/logos/epinotes_logo_7.png); background-color: #131415; background-size: 90%"> <span class="branding-bar">Epinotes</span> <span class="branding-icon"><i class="fas fa-user-friends fa-fw"></i></span> </a> <a href="https://annales.hyperion.tf/" class="tile-small-wide text-dark" style="background-image: url(https://static.hyperion.tf/hyperion/img/favicon.ico); background-color: #eee; background-size: auto 40%; background-position: 95% 85%"> <span class="branding-bar">HyperAnnales</span> <span class="branding-icon"><i class="fas fa-user-friends fa-fw"></i></span> </a> <a href="http://mastercorp.epita.eu/" class="tile-small-wide text-dark" style="; background-color: #fff"> <span class="branding-bar">Mastercorp</span> <span class="branding-icon"><i class="fas fa-user-friends fa-fw"></i></span> </a> </div> <hr /> <h2>Other links</h2> <div class="tiles-grid"> <a href="https://console.bocal.org/" class="tile-small-wide text-dark" style="; background-color: #e7e7e7"> <span class="branding-bar">Console Bocal</span> </a> <a href="https://logement.epita.fr/" class="tile-small-wide text-dark" 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; ); background-color: #fff; background-size: 90%; background-position-y: 30%"> <span class="branding-bar">EPITA Studapart</span> </a> <a href="https://www.lse.epita.fr/" class="tile-small-wide" style="background-image: url(https://www.lse.epita.fr/images/logoLSE.png); background-color: #141212; background-size: auto 80%; background-position-x: 75%"> <span class="branding-bar">LSE</span> </a> <a href="https://www.lrde.epita.fr/" class="tile-small-wide text-dark" style="background-image: url(https://www.lrde.epita.fr/skins/common/images/logo.png); background-color: #d5e6f7; background-position-x: right"> <span class="branding-bar">LRDE</span> </a> <a href="https://www.3ie.fr/" class="tile-small-wide" style="background-image: url(https://www.3ie.fr/images/3ie-logo.svg); background-color: #00ffd2; background-size: auto 90%"> <span class="branding-bar">3ie</span> </a> </div> </div> </div> <div id="footer"> <div class="container"> <p> Made with <i class="fas fa-heart fa-fw text-danger"></i> by EPITA students. <a href="https://github.com/Epidocs/epita.it#license"> <img alt="CC BY-NC 4.0" src="https://mirrors.creativecommons.org/presskit/buttons/80x15/svg/by-nc.svg" /> </a> <br /> We use cookies for analytics purposes. </p> <ul> <li><a href="https://github.com/Epidocs/epita.it" class="btn btn-primary btn-sm">Contribuez sur Github</a></li> <li><a href="https://epidocs.eu/" class="btn btn-info btn-sm">Géré par Epidocs</a></li> <!-- <li><a href="/tos.html" class="btn btn-primary btn-sm">Conditions générales</a></li> --> </ul> </div> </div> <script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" integrity="sha256-pasqAKBDmFT4eHoN2ndd6lN370kFiGUFyTiUHWhU7k8=" crossorigin="anonymous"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script> <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script> <script src="/assets/js/script.js?v=3eecd7b5b45a2b51c9acc74625c417d54a724854"></script> </body> </html> '; preg_match_all($re, $str, $matches, PREG_SET_ORDER, 0); // Print the entire match result var_dump($matches);

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 PHP, please visit: http://php.net/manual/en/ref.pcre.php