Save & Share

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

Flavor

  • PCRE2 (PHP)
  • ECMAScript (JavaScript)
  • Python
  • Golang
  • Java
  • .NET 7.0 (C#)
  • Rust
  • PCRE (Legacy)
  • Regex Flavor Guide

Function

  • Match
  • Substitution
  • List
  • Unit Tests
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
Processing...

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 = "(?s)(\w+\s+RN)(?:(?!\s(?:RN|VA|VM)).)*?(\w+\s+VA\w+)(?:(?!\s(?:RN|VA|VM)).)*?(\w+\s+VM\w+)" Local $sString = "No no RN 0.998045" & @CRLF & _ "sabía saber VMII3S0 0.592869" & @CRLF & _ "como como CS 0.999289" & @CRLF & _ "se se P00CN000 0.465639" & @CRLF & _ "ponía poner VMII3S0 0.65" & @CRLF & _ "una uno DI0FS0 0.951575" & @CRLF & _ "error error RN" & @CRLF & _ "actuar accion VMP00SM" & @CRLF & _ "lavadora lavadora NCFS000 0.414738" & @CRLF & _ "hasta hasta SPS00 0.957698" & @CRLF & _ "error error VMP00SM" & @CRLF & _ "que que PR0CN000 0.562517" & @CRLF & _ "conocí conocer VMIS1S0 1" & @CRLF & _ "esta este DD0FS0 0.986779" & @CRLF & _ "error error VA00SM" & @CRLF & _ "y y CC 0.999962" & @CRLF & _ "es ser VSIP3S0 1" & @CRLF & _ "que que CS 0.437483" & @CRLF & _ "es ser VSIP3S0 1" & @CRLF & _ "muy muy RG 1" & @CRLF & _ "sencilla sencillo AQ0FS0 1" & @CRLF & _ "de de SPS00 0.999984" & @CRLF & _ "utilizar utilizar VMN0000 1" & @CRLF & _ "! ! Fat 1" & @CRLF & _ "" & @CRLF & _ "Todo todo DI0MS0 0.560961" & @CRLF & _ "un uno DI0MS0 0.987295" & @CRLF & _ "gustazo gustazo NCMS000 1" & @CRLF & _ "error error VA00SM" & @CRLF & _ "cuando cuando CS 0.985595" & @CRLF & _ "estamos estar VAIP1P0 1" & @CRLF & _ "error error VMP00RM" & @CRLF & _ "aprendiendo aprender VMG0000 1" & @CRLF & _ "para para SPS00 0.999103" & @CRLF & _ "emancipar emancipar VMN0000 1" & @CRLF & _ "nos nos PP1CP000 1" & @CRLF & _ ", , Fc 1" & @CRLF & _ "que que CS 0.437483" & @CRLF & _ "si si CS 0.99954" & @CRLF & _ "error error RN" & @CRLF & _ "nos nos PP1CP000 0.935743" & @CRLF & _ "ponen poner VMIP3P0 1" & @CRLF & _ "facilidad facilidad NCFS000 1" & @CRLF & _ "con con SPS00 1" & @CRLF & _ "las el DA0FP0 0.970954" & @CRLF & _ "error error VMP00RM" & @CRLF & _ "tareas tarea NCFP000 1" & @CRLF & _ "de de SPS00 0.999984" & @CRLF & _ "alla alla VASI1S0 " & @CRLF & _ "la el DA0FS0 0.972269" & @CRLF & _ "casa casa NCFS000 0.979058" & @CRLF & _ "pues pues CS 0.998047" & @CRLF & _ "mejor mejor AQ0CS0 0.873665" & @CRLF & _ "que que PR0CN000 0.562517" & @CRLF & _ "mejor mejor AQ0CS0 0.873665" & @CRLF & _ "no no RN " & @CRLF & _ "esta estar VASI1S0 " & @CRLF & _ "lavando lavar VMP00SM" & @CRLF & _ ". . Fp 1" 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