Myregextester.com is the premier online regular expressions tester that allows visitors to construct, test, and optimize regular expressions.

 Click here to manually set the number of rows for match/replacement textareas. Regex Cheat Sheet Regex Tutorials Regex Book

URL SOURCE:   FILE SOURCE:

MATCH PATTERN:

REPLACEMENT PATTERN:

OPERATION: # # FLAGS: i
x
m
s
 Help SHOW MATCH ARRAY:    EXPLAIN:    SHOW CODE: PHP
ASP
VB.NET
C#.NET
Java
JS
DELIM: HIGHLIGHT MATCHES:      GEN SAMPLES:   
    Save example     Help     FROM: TO: 

PASSWORD RESTRICTIONS:

Allow only these characters:  (any character)  ]
At Least  Total Characters
No More Than   Total Characters
At Least  Lowercase Characters (a-z)
At Least  Uppercase Characters (A-Z)
At Least  Numeric Characters (0-9)
At Least  Special Characters in [^a-zA-Z0-9]  ]
Disallow sequential alphanumeric sequences of or more (i.e. 123... abc... ABC...)
Disallow repeating characters of or more (i.e. 11... aa... AA... %%...)

WORD LIST:



SOURCE TEXT:

HIGHLIGHTED MATCHES:

Select All (to copy etc.)
CAPTURE GROUPS Help
0
 
1
 
2

81:13-bk-92555
10:11-se-223
110:11-se-223
110:11-se-223343
110:11-sde-223343
0:11-sde-223343
08:23-ss-929
11:20-sl-20002
10:00-aa-200
10:11-se-223343
08:11-se-22
08:11-se-221111
8:11-sa-234

RESULTS:

Select All (to copy etc.)
Execution Time(sec.):
0.000006

Raw Match Pattern:
(\b(8|08|10):\d{2}-[a-zA-Z]{2}-\d{3,5}\b)

Match Pattern Explanation:
The regular expression:

(?i-msx:(\b(8|08|10):\d{2}-[a-zA-Z]{2}-\d{3,5}\b))

matches as follows:
  
NODE                     EXPLANATION
----------------------------------------------------------------------
(?i-msx:                 group, but do not capture (case-insensitive)
                         (with ^ and $ matching normally) (with . not
                         matching \n) (matching whitespace and #
                         normally):
----------------------------------------------------------------------
  (                        group and capture to \1:
----------------------------------------------------------------------
    \b                       the boundary between a word char (\w)
                             and something that is not a word char
----------------------------------------------------------------------
    (                        group and capture to \2:
----------------------------------------------------------------------
      8                        '8'
----------------------------------------------------------------------
     |                        OR
----------------------------------------------------------------------
      08                       '08'
----------------------------------------------------------------------
     |                        OR
----------------------------------------------------------------------
      10                       '10'
----------------------------------------------------------------------
    )                        end of \2
----------------------------------------------------------------------
    :                        ':'
----------------------------------------------------------------------
    \d{2}                    digits (0-9) (2 times)
----------------------------------------------------------------------
    -                        '-'
----------------------------------------------------------------------
    [a-zA-Z]{2}              any character of: 'a' to 'z', 'A' to 'Z'
                             (2 times)
----------------------------------------------------------------------
    -                        '-'
----------------------------------------------------------------------
    \d{3,5}                  digits (0-9) (between 3 and 5 times
                             (matching the most amount possible))
----------------------------------------------------------------------
    \b                       the boundary between a word char (\w)
                             and something that is not a word char
----------------------------------------------------------------------
  )                        end of \1
----------------------------------------------------------------------
)                        end of grouping
----------------------------------------------------------------------

C#.NET Code Example:

using System;
using System.Text.RegularExpressions;
namespace myapp
{
  class Class1
    {
      static void Main(string[] args)
        {
          String sourcestring = "source string to match with pattern";
          Regex re = new Regex(@"(\b(8|08|10):\d{2}-[a-zA-Z]{2}-\d{3,5}\b)",RegexOptions.IgnoreCase);
          Match m = re.Match(sourcestring);
          for (int gIdx = 0; gIdx < m.Groups.Count; gIdx++)
            {
              Console.WriteLine("[{0}] = {1}", re.GetGroupNames()[gIdx], m.Groups[gIdx].Value);
            }
        }
    }
}


$matches Array:
(
    [0] => 10:11-se-223
    [1] => 10:11-se-223
    [2] => 10
)