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: # # USE .NET FLAGS: i
x
m
s
 Help SHOW MATCH ARRAY:    EXPLAIN:  OPTIMIZE:    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
 
3

<PRESOL> <DATE>0622 <YEAR>99 <AGENCY>General Services Administration <OFFICE>Public Buildings Service (PBS) <LOCATION>Spokane Customer Services Center (10PM3) <ZIP>99201-1075 <CLASSCOD>Z <OFFADD>General Services Administration, Public Buildings Service (PBS), Spokane Customer Services Center (10PM3), 920 West Riverside Avenue, Room 120, U. S. Courthouse, Spokane, WA  99201-1075 <SUBJECT>EXTERIOR PAINTING, FB/USPO, SPOKANE, WASHINGTON <SOLNBR>10PM3XX990138 <RESPDATE>081199 <CONTACT>Cheryl O'Donnell, Contract Specialist, Phone (509) 353-2457, Fax (509) 353-2359, Email cheryl.odonnell@gsa.gov - Eva Hutchison, Procurement Technician, Phone (509) 353-2457, Fax (509) 353-2359, Email eva.hutchison@gsa.gov <DESC>Contractor shall furnish all labor, materials and equipment to paint all previously painted workwork and exterior metal on the FB/USPO, 904 West Riverside Avenue, Spokane, Washington.  Building is five [5] stories.  Repair/replace missing, loose, cracked or defective caulking and glazing compound from glass, frames and trim of exterior windows.  All old paint contains lead.  Sic Code 1721.  All responsible sources may submit a quotation which, if timely received, may be considered by the Government.  This procurement is set aside for small business concerns.  Price range $100,000 - $250,000.  Please fax requests for solicitations to 509-353-2359. <LINK> <URL>http://www.fbo.gov/spg/GSA/PBS/10PM3/10PM3XX990138/listing.html <DESC>Link to FedBizOpps document. <EMAIL> <ADDRESS>cheryl.odonnell@gsa.gov <DESC>Cheryl O'Donnell </PRESOL>

RESULTS:

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

Raw Match Pattern:
(?:<date>)(.*?)(?:<year>)(.*?)(?:<agency>)(.*?)(?:<office>)

VB.NET Code Example:

Imports System.Text.RegularExpressions
Module Module1
  Sub Main()
    Dim sourcestring as String = "replace with your source string"
    Dim re As Regex = New Regex("(?:<date>)(.*?)(?:<year>)(.*?)(?:<agency>)(.*?)(?:<office>)",RegexOptions.IgnoreCase)
    Dim mc as MatchCollection = re.Matches(sourcestring)
    Dim mIdx as Integer = 0
    For each m as Match in mc
      For groupIdx As Integer = 0 To m.Groups.Count - 1
        Console.WriteLine("[{0}][{1}] = {2}", mIdx, re.GetGroupNames(groupIdx), m.Groups(groupIdx).Value)
      Next
      mIdx=mIdx+1
    Next
  End Sub
End Module


$matches Array:
(
    [0] => Array
        (
            [0] => <DATE>0622 <YEAR>99 <AGENCY>General Services Administration <OFFICE>
        )

    [1] => Array
        (
            [0] => 0622 
        )

    [2] => Array
        (
            [0] => 99 
        )

    [3] => Array
        (
            [0] => General Services Administration 
        )

)