Re: regex help/check needed



However, in my .net code, it only returns one group match and it's the
whole thing:

<title>Google


As I read more into this, I'm thinking that's actually the correct behavior.
The MatchCollection is every instance of a match of my FULL regex.

So, I guess the better question is: how do I get the regex groupings (ie,
the stuff between the () parenthesis) individually?

I want to find <title>something

and then just keep 'something'.

I could use string functions to just trim the 7 characters, which would work
in this case, but am curious as to whether one can access the individual
regex groups for each match in the matchcollection.

-Darrel


.



Relevant Pages

  • Re: =?ISO-8859-1?Q?Regul=E4rer_Ausdruck?=
    ... ich will per Regex aus einem klassischen "domain\user" den Usernamen ... MatchCollection matchCollection = _regEx.Matches; ... Dein regulärer Ausdruck trifft schon, und zwar den ganzen String. ...
    (microsoft.public.de.german.entwickler.dotnet.csharp)
  • Re: =?ISO-8859-1?Q?Regul=E4rer_Ausdruck?=
    ... ich will per Regex aus einem klassischen "domain\user" den Usernamen ausschneiden. ... public string RemoveDomain{ ... MatchCollection matchCollection = _regEx.Matches; ...
    (microsoft.public.de.german.entwickler.dotnet.csharp)
  • =?ISO-8859-15?Q?Regul=E4rer_Ausdruck?=
    ... ich will per Regex aus einem klassischen "domain\user" den Usernamen ausschneiden. ... Also folgender kleiner Test: ... MatchCollection matchCollection = _regEx.Matches; ... Those who know binary code, ...
    (microsoft.public.de.german.entwickler.dotnet.csharp)
  • Regex zum Extrahieren von Absatztexten
    ... Matchcollection zurückgibt, die Absatzmarken sollen außen vor bleiben. ... wie der Pattern aussieht? ...
    (microsoft.public.de.german.entwickler.dotnet.csharp)