The Capture, Group and Match classes all have properties such as the
Index (position of matched substring) and the length (length of the
matched substring). I think that these properties are exactly what you
need.

I'd be interested to take a look at your utility when you complete it!
You may want to evaluate RegexBuddy to see some of the cool features a
Regex engine can provide.

On May 11, 2:15 am, Sathyaish <[email protected]> wrote:
> For fun, I'm developing a utility that will take an input string and a
> regex and will color highlight all matches of the regex in the
> original string, alike the Find function in Firefox or IE 8, and some
> popular browsers.
>
> I am using C#. Does any member of the System.Text.RegularExpressions
> namespace return the ordinal positions of the matches in the original
> string? I also need their lengths.
>
> Is there a way to get this information?

Reply via email to