Regular Expressions 101

Save & Share

  • Regex Version: ver. 1
  • Update Regex
    ctrl+⇧+s
  • Save new Regex
    ctrl+s
  • Add to Community Library

Flavor

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

Function

  • Match
  • Substitution
  • List
  • Unit Tests

Tools

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

Regular Expression

/
/
gm

Test String

Code Generator

Generated Code

#include <StringConstants.au3> ; to declare the Constants of StringRegExp #include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate Local $sRegex = "(?m)^## .*" & @CRLF & _ "" Local $sString = "# Automatisation RH : 5 Stratégies Révolutionnaires pour Transformer Votre Gestion des Talents en 2024" & @CRLF & _ "" & @CRLF & _ "## Introduction" & @CRLF & _ "- État des lieux de l'automatisation RH en 2024" & @CRLF & _ "- Enjeux et défis actuels des départements RH" & @CRLF & _ "- Présentation des bénéfices de l'automatisation" & @CRLF & _ "" & @CRLF & _ "## I. L'automatisation du recrutement" & @CRLF & _ "### 1.1 Solutions de présélection des candidats" & @CRLF & _ "- Intelligence artificielle dans le tri des CV" & @CRLF & _ "- Chatbots pour le premier contact" & @CRLF & _ "- Évaluation automatisée des compétences" & @CRLF & _ "" & @CRLF & _ "### 1.2 Optimisation du processus d'entretien" & @CRLF & _ "- Planification automatique des rendez-vous" & @CRLF & _ "- Outils d'évaluation digitaux" & @CRLF & _ "- Suivi automatisé des candidatures" & @CRLF & _ "" & @CRLF & _ "## II. Digitalisation de l'onboarding" & @CRLF & _ "### 2.1 Plateformes d'intégration digitale" & @CRLF & _ "- Portails RH automatisés" & @CRLF & _ "- Parcours d'intégration personnalisés" & @CRLF & _ "- Documentation numérique intelligente" & @CRLF & _ "" & @CRLF & _ "### 2.2 Suivi automatisé des nouveaux collaborateurs" & @CRLF & _ "- KPIs d'intégration" & @CRLF & _ "- Feedback automatique" & @CRLF & _ "- Programmes de formation digitaux" & @CRLF & _ "" & @CRLF & _ "## III. Gestion administrative automatisée" & @CRLF & _ "### 3.1 Dématérialisation des processus RH" & @CRLF & _ "- Gestion automatique des congés" & @CRLF & _ "- Système de paie intelligent" & @CRLF & _ "- Archivage numérique sécurisé" & @CRLF & _ "" & @CRLF & _ "### 3.2 Conformité et reporting" & @CRLF & _ "- Tableaux de bord automatisés" & @CRLF & _ "- Alertes réglementaires" & @CRLF & _ "- Génération de rapports RH" & @CRLF & _ "" & @CRLF & _ "## IV. Management de la performance" & @CRLF & _ "### 4.1 Outils d'évaluation continue" & @CRLF & _ "- Systèmes d'objectifs digitalisés" & @CRLF & _ "- Feedback en temps réel" & @CRLF & _ "- Analytics RH" & @CRLF & _ "" & @CRLF & _ "### 4.2 Développement des compétences" & @CRLF & _ "- Parcours de formation automatisés" & @CRLF & _ "- Recommandations personnalisées" & @CRLF & _ "- Suivi des certifications" & @CRLF & _ "" & @CRLF & _ "## V. Analyse prédictive des talents" & @CRLF & _ "### 5.1 Intelligence artificielle en RH" & @CRLF & _ "- Prédiction des turnovers" & @CRLF & _ "- Identification des hauts potentiels" & @CRLF & _ "- Planification prévisionnelle" & @CRLF & _ "" & @CRLF & _ "### 5.2 ROI et mesure d'impact" & @CRLF & _ "- Indicateurs clés de performance" & @CRLF & _ "- Analyse coûts-bénéfices" & @CRLF & _ "- Optimisation continue" & @CRLF & _ "" & @CRLF & _ "## Conclusion" & @CRLF & _ "- Synthèse des stratégies présentées" & @CRLF & _ "- Perspectives d'évolution" & @CRLF & _ "- Recommandations pour démarrer" Local $aArray = StringRegExp($sString, $sRegex, $STR_REGEXPARRAYGLOBALFULLMATCH) Local $aFullArray[0] For $i = 0 To UBound($aArray) -1 _ArrayConcatenate($aFullArray, $aArray[$i]) Next $aArray = $aFullArray ; Present the entire match result _ArrayDisplay($aArray, "Result")

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 AutoIt, please visit: https://www.autoitscript.com/autoit3/docs/functions/StringRegExp.htm