Re: [TSVN] regex help
From: Douglas Stonham <dstonham_at_pennysaverusa.net>
Date: 2005-02-18 00:03:16 CET
On Thu, February 17, 2005 1:29 pm, SteveKing said:
Interestingly, it seems that the .net regex has indeed been extended to
----
Dim r As New Regex(txtPattern.Text)
Dim mc As MatchCollection
Dim gc As GroupCollection
Dim cc As CaptureCollection
Dim i, j, k As Integer
mc = r.Matches(txtInput.Text)
For i = 0 To mc.Count - 1
gc = mc(i).Groups
For j = 0 To gc.Count - 1
cc = gc(j).Captures
For k = 0 To cc.Count - 1
litMatches.Text += "<br>" + i.ToString + ":" + j.ToString +
":" + k.ToString + ":" + cc(k).Value()
Next
Next
Next
----
Produces:
0:0:0:Issue #8,9, #10, #11 , and #12
0:1:0:8
0:1:1:9
0:1:2:10
0:1:3:11
0:1:4:12
Unfortunately, I have never heard of a regex engine doing this before so
it is unlikely that GRETA supports it, but still interesting.
Douglas
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Fri Feb 18 00:04:27 2005
|
This is an archived mail posted to the TortoiseSVN Dev mailing list.
This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.