Compare Page Revisions
« Older Revision - Back to Page History - Current Revision
using System.Text.RegularExpressions;
^(\d{2}/\d{2}/\d{4})?$
^(1[0-2]|\d)\:\d{2}\s{0,}[APap][Mm]$
^[2-9]\d{2}\-\d{3}\-\d{4}$
^([2-9]\d{2}\-|\([2-9]\d{2}\))\d{3}\-\d{4}
^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$
^\{{0,1}[A-Fa-f0-9]{8}\-[A-Fa-f0-9]{4}\-[A-Fa-f0-9]{4}\-[A-Fa-f0-9]{4}\-[A-Fa-f0-9]{12}\}{0,1}$
var.([A-Za-z0-9]*)[^A-Za-z0-9]
^[A-Za-z][A-Za-z0-9_]{0,7}\.[A-Za-z0-9_]{0,3}$
^[A-Za-z][^ \"<>|:*?\\/]{0,7}\.[^ \"<>|:*?\\/]{0,3}$
^(?#Protocol)(?:(?:ht|f)tp(?:s?)\:\/\/|~/|/)?(?#Username:Password)(?:\w+:\w+@)?(?#Subdomains)(?:(?:[-\w]+\.)+(?#TopLevel Domains)(?:com|org|net|gov|mil|biz|info|mobi|name|aero|jobs|museum|travel|[a-z]{2}))(?#Port)(?::[\d]{1,5})?(?#Directories)(?:(?:(?:/(?:[-\w~!$+|.,=]|%[a-f\d]{2})+)+|/)+|\?|#)?(?#Query)(?:(?:\?(?:[-\w~!$+|.,*:]|%[a-f\d{2}])+=(?:[-\w~!$+|.,*:=]|%[a-f\d]{2})*)(?:&(?:[-\w~!$+|.,*:]|%[a-f\d{2}])+=(?:[-\w~!$+|.,*:=]|%[a-f\d]{2})*)*)*(?#Anchor)(?:#(?:[-\w~!$+|.,*:=]|%[a-f\d]{2})*)?$
Regex r = new RegEx("Cells\(([A-Za-z]*))"); MatchCollection mc = r.Matches("Cells(uxIdColumn)") string result = mc[0].Groups[1].Value // result now = "uxIdColumn"
//Note: MUST wrap the regular expression in parentheses (i.e., use groups) regex.Matches(testString).Item(0).Groups(1).Value = testString ?
ScrewTurn Wiki version 3.0.1.400. Some of the icons created by FamFamFam. Except where noted, all contents Copyright © 1999-2024, Patrick Jasinski.