Save & Share

  • Current Version: 8
  • 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

$re = '/.*?\d+ /m'; $str = 'Start [2018/07/06 15:46:39], Index=0 SF[01] ch1[2e93,3a84] ch2[2d59,3924] ch3[32bf,3f4b] ch4[2fcb,3c0c] TE[0] HU[0] a[3.5391] b[1.4672] c[0.000522] Tm1[1.56962] Tm2[1.745568] Tm3[1.648998] Tm4[1.724688] SF[02] ch1[29dd,36c7] ch2[2f45,3b93] ch3[31af,3ded] ch4[2dd3,39cc] TE[0] HU[0] a[3.5391] b[1.4672] c[0.000522] Tm1[1.49031] Tm2[1.627074] Tm3[1.614024] Tm4[1.5932] SF[03] ch1[315c,3dfa] ch2[312f,3dac] ch3[31ae,3eda] ch4[2d11,3910] TE[0] HU[0] a[3.5391] b[1.4672] c[0.000522] Tm1[1.64691] Tm2[1.611414] Tm3[1.689544] Tm4[1.588446] SF[04] ch1[2ddf,393a] ch2[2cbc,3923] ch3[2bf5,386c] ch4[318b,3d4d] TE[0] HU[0] a[3.5391] b[1.4672] c[0.000522] Tm1[1.678752] Tm2[1.88964] Tm3[1.605672] Tm4[1.64691] SF[05] ch1[2e41,3af4] ch2[3316,3f5b] ch3[30fd,3cf5] ch4[308f,3d6f] TE[0] HU[0] a[3.5391] b[1.4672] c[0.000522] Tm1[1.636367] Tm2[1.598886] Tm3[1.6443] Tm4[1.621225] SF[06] ch1[32a7,3ed7] ch2[2e69,3ae4] ch3[3099,3cbc] ch4[2d6d,3946] TE[0] HU[0] a[3.5391] b[1.4672] c[0.000522] Tm1[1.643256] Tm2[1.690236] Tm3[1.593833] Tm4[1.63386] SF[07] ch1[2dbf,39ae] ch2[2eb3,3ac5] ch3[2e4d,39e2] ch4[2dd6,3998] TE[0] HU[0] a[3.5391] b[1.4672] c[0.000522] Tm1[1.57122] Tm2[1.680318] Tm3[1.67301] Tm4[1.65213] SF[08] ch1[3342,3f01] ch2[2d0f,38cf] ch3[2ec1,3a51] ch4[2c04,37ba] TE[0] HU[0] a[3.5391] b[1.4672] c[0.000522] Tm1[1.570133] Tm2[1.69128] Tm3[1.524315] Tm4[1.63647] VC[01] ch1[False,0,1.8,500,100] ch2[False,0,1.8,500,100] ch3[False,0,1.8,500,100] ch4[False,0,1.8,500,100] SET[06:00,18:00,02:00,00:10,150] VC[02] ch1[False,0,1.8,500,100] ch2[False,0,1.8,500,100] ch3[False,0,1.8,500,100] ch4[False,0,1.8,500,100] SET[06:00,18:00,02:00,00:10,150] VC[03] ch1[False,0,1.8,500,100] ch2[False,0,1.8,500,100] ch3[False,0,1.8,500,100] ch4[False,0,1.8,500,100] SET[06:00,18:00,02:00,00:10,150] VC[04] ch1[False,0,1.8,500,100] ch2[False,0,1.8,500,100] ch3[False,0,1.8,500,100] ch4[False,0,1.8,500,100] SET[06:00,18:00,02:00,00:10,150] VC[05] ch1[False,0,1.8,500,100] ch2[False,0,1.8,500,100] ch3[False,0,1.8,500,100] ch4[False,0,1.8,500,100] SET[06:00,18:00,02:00,00:10,150] VC[06] ch1[False,0,1.8,500,100] ch2[False,0,1.8,500,100] ch3[False,0,1.8,500,100] ch4[False,0,1.8,500,100] SET[06:00,18:00,02:00,00:10,150] VC[07] ch1[False,0,1.8,500,100] ch2[False,0,1.8,500,100] ch3[False,0,1.8,500,100] ch4[False,0,1.8,500,100] SET[06:00,18:00,02:00,00:10,150] VC[08] ch1[False,0,1.8,500,100] ch2[False,0,1.8,500,100] ch3[False,0,1.8,500,100] ch4[False,0,1.8,500,100] SET[06:00,18:00,02:00,00:10,150] [20180706v2 15:48:27], Index=1 SF[01] ch1[2f19,3b04] ch2[2e1a,3984] ch3[334d,3fa6] ch4[300f,3c5a] TE[0] HU[0] a[3.5391] b[1.4672] c[0.000522] Tm1[1.56962] Tm2[1.745568] Tm3[1.648998] Tm4[1.724688] SF[02] ch1[2b72,38af] ch2[2fd1,3be8] ch3[322e,3e4e] ch4[2e14,3a15] TE[0] HU[0] a[3.5391] b[1.4672] c[0.000522] Tm1[1.49031] Tm2[1.627074] Tm3[1.614024] Tm4[1.5932] SF[03] ch1[3210,3eea] ch2[3215,3e23] ch3[321c,3ef5] ch4[2d69,395b] TE[0] HU[0] a[3.5391] b[1.4672] c[0.000522] Tm1[1.64691] Tm2[1.611414] Tm3[1.689544] Tm4[1.588446] SF[04] ch1[2e6d,3a3e] ch2[2da7,3994] ch3[2c85,38b4] ch4[322b,3dd8] TE[0] HU[0] a[3.5391] b[1.4672] c[0.000522] Tm1[1.678752] Tm2[1.88964] Tm3[1.605672] Tm4[1.64691] SF[05] ch1[2ee6,3bd9] ch2[3427,4015] ch3[3196,3e3a] ch4[3136,3e0f] TE[0] HU[0] a[3.5391] b[1.4672] c[0.000522] Tm1[1.636367] Tm2[1.598886] Tm3[1.6443] Tm4[1.621225] SF[06] ch1[332e,3f98] ch2[2f3c,3b52] ch3[3132,3d19] ch4[2dca,39d7] TE[0] HU[0] a[3.5391] b[1.4672] c[0.000522] Tm1[1.643256] Tm2[1.690236] Tm3[1.593833] Tm4[1.63386] SF[07] ch1[2e4a,3a50] ch2[2f46,3ae3] ch3[2ed3,3a33] ch4[2e59,39ff] TE[0] HU[0] a[3.5391] b[1.4672] c[0.000522] Tm1[1.57122] Tm2[1.680318] Tm3[1.67301] Tm4[1.65213] SF[08] ch1[33b7,3f8a] ch2[2db3,391f] ch3[2f26,3aa5] ch4[2c62,3816] TE[0] HU[0] a[3.5391] b[1.4672] c[0.000522] Tm1[1.570133] Tm2[1.69128] Tm3[1.524315] Tm4[1.63647] [2018-07-06 15:50:11], Index=2 SF[01] ch1[2ef8,3b4c] ch2[2e25,397b] ch3[337f,3f71] ch4[301a,3c85] TE[0] HU[0] a[3.5391] b[1.4672] c[0.000522] Tm1[1.56962] Tm2[1.745568] Tm3[1.648998] Tm4[1.724688] SF[02] ch1[2c08,39c4] ch2[2fe3,3bd3] ch3[324a,3de9] ch4[2dc8,39fd] TE[0] HU[0] a[3.5391] b[1.4672] c[0.000522] Tm1[1.49031] Tm2[1.627074] Tm3[1.614024] Tm4[1.5932] SF[03] ch1[321a,3f43] ch2[3224,3e1a] ch3[3210,3e19] ch4[2d30,394e] TE[0] HU[0] a[3.5391] b[1.4672] c[0.000522] Tm1[1.64691] Tm2[1.611414] Tm3[1.689544] Tm4[1.588446] SF[04] ch1[2e79,3ab7] ch2[2dd7,39b0] ch3[2cad,3891] ch4[321e,3de5] TE[0] HU[0] a[3.5391] b[1.4672] c[0.000522] Tm1[1.678752] Tm2[1.88964] Tm3[1.605672] Tm4[1.64691] SF[05] ch1[2f31,3c01] ch2[3454,403c] ch3[31b3,3df1] ch4[3114,3dea] TE[0] HU[0] a[3.5391] b[1.4672] c[0.000522] Tm1[1.636367] Tm2[1.598886] Tm3[1.6443] Tm4[1.621225] SF[06] ch1[3347,3f99] ch2[2f2f,3b42] ch3[314d,3cf8] ch4[2db9,39bb] TE[0] HU[0] a[3.5391] b[1.4672] c[0.000522] Tm1[1.643256] Tm2[1.690236] Tm3[1.593833] Tm4[1.63386] SF[07] ch1[2e4e,3a77] ch2[2f47,3b12] ch3[2f03,3a31] ch4[2e79,3a08] TE[0] HU[0] a[3.5391] b[1.4672] c[0.000522] Tm1[1.57122] Tm2[1.680318] Tm3[1.67301] Tm4[1.65213] SF[08] ch1[33ce,3fb1] ch2[2dcf,3952] ch3[2f6e,3ab4] ch4[2c7a,3839] TE[0] HU[0] a[3.5391] b[1.4672] c[0.000522] Tm1[1.570133] Tm2[1.69128] Tm3[1.524315] Tm4[1.63647] [2018-07-06 15:52:00], Index=3 '; 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