skip to main
|
skip to sidebar
Usman's Blog - my techie adventures
good programmers write good code; great programmers steal great code
Showing posts with label
RegEx
.
Show all posts
Showing posts with label
RegEx
.
Show all posts
Tuesday, April 17, 2007
regex: match a value between two strings
how to capture a value, by group name, between two known string patterns
regex :
Regex re = new Regex("str1(?
.*?)str2",RegexOptions.Singleline);
foreach (Match m in re.Matches(data)) {
Console.WriteLine(m.Groups["val"].Value );
}
Older Posts
Home
Subscribe to:
Posts (Atom)
Web Albums
my shared items
Blog Archive
▼
2007
(24)
▼
August
(1)
blog moved
►
July
(4)
►
April
(2)
►
March
(4)
►
February
(8)
►
January
(5)
►
2006
(20)
►
December
(2)
►
November
(3)
►
September
(1)
►
July
(4)
►
June
(1)
►
May
(1)
►
April
(1)
►
February
(1)
►
January
(6)
►
2005
(9)
►
December
(2)
►
November
(2)
►
January
(5)