Save & Share

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 = "(?mi)^\s(\w{1,}):\s+((?:\w\w\s)+)\s+(\w+)(.*)" Local $sString = " 6bb: c3 ret " & @CRLF & _ " 6bc: 0f 1f 40 00 nop DWORD PTR [rax+0x0]" & @CRLF & _ " 6c0: 41 57 push r15" & @CRLF & _ " 6c2: 41 56 push r14" & @CRLF & _ " 6c4: 41 89 ff mov r15d,edi" & @CRLF & _ " 6c7: 41 55 push r13" & @CRLF & _ " 6c9: 41 54 push r12" & @CRLF & _ " 6cb: 4c 8d 25 06 07 20 00 lea r12,[rip+0x200706] # 0x200dd8" & @CRLF & _ " 6d2: 55 push rbp" & @CRLF & _ " 6d3: 48 8d 2d 06 07 20 00 lea rbp,[rip+0x200706] # 0x200de0" & @CRLF & _ " 6da: 53 push rbx" & @CRLF & _ " 6db: 49 89 f6 mov r14,rsi" & @CRLF & _ " 6de: 49 89 d5 mov r13,rdx" & @CRLF & _ " 6e1: 4c 29 e5 sub rbp,r12" & @CRLF & _ " 6e4: 48 83 ec 08 sub rsp,0x8" & @CRLF & _ " 6e8: 48 c1 fd 03 sar rbp,0x3" & @CRLF & _ " 6ec: e8 3f fe ff ff call 0x530" & @CRLF & _ " 6f1: 48 85 ed test rbp,rbp" & @CRLF & _ " 6f4: 74 20 je 0x716" & @CRLF & _ " 6f6: 31 db xor ebx,ebx" & @CRLF & _ " 6f8: 0f 1f 84 00 00 00 00 nop DWORD PTR [rax+rax*1+0x0]" & @CRLF & _ " 6ff: 00 " & @CRLF & _ " 700: 4c 89 ea mov rdx,r13" & @CRLF & _ " 703: 4c 89 f6 mov rsi,r14" & @CRLF & _ " 706: 44 89 ff mov edi,r15d" & @CRLF & _ " 709: 41 ff 14 dc call QWORD PTR [r12+rbx*8]" & @CRLF & _ " 70d: 48 83 c3 01 add rbx,0x1" & @CRLF & _ " 711: 48 39 dd cmp rbp,rbx" & @CRLF & _ " 714: 75 ea jne 0x700" & @CRLF & _ " 716: 48 83 c4 08 add rsp,0x8" & @CRLF & _ " 71a: 5b pop rbx" & @CRLF & _ " 71b: 5d pop rbp" & @CRLF & _ " 71c: 41 5c pop r12" & @CRLF & _ " 71e: 41 5d pop r13" & @CRLF & _ " 720: 41 5e pop r14" & @CRLF & _ " 722: 41 5f pop r15" & @CRLF & _ " 724: c3 ret " & @CRLF & _ " 725: 90 nop" & @CRLF & _ " 726: 66 2e 0f 1f 84 00 00 nop WORD PTR cs:[rax+rax*1+0x0]" & @CRLF & _ " 72d: 00 00 00 " & @CRLF & _ " 730: f3 c3 repz ret " & @CRLF & _ "" 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