regular expression tag

  • Thread starter Thread starter Daniel Bass
  • Start date Start date
D

Daniel Bass

Once before i saw something where you had some regular
expression, with some sort of tag in it, so a match could
be easily referenced by the "Groups" property, rather
than going by an index...

"[\w]+\s*[\d]+"

instead of saying myMatch.Groups[0], it would be like

"{First}[\w]+\s*{Second}[\d]+"

and then reference myMatch.Groups["First"]...

is this remotely an existing concept?

Thanks
Dan.
 
Don't worry, i looked a bit more and found a solution....

http://aspnet.4guysfromrolla.com/articles/022603-1.aspx


Once before i saw something where you had some regular
expression, with some sort of tag in it, so a match could
be easily referenced by the "Groups" property, rather
than going by an index...

"[\w]+\s*[\d]+"

instead of saying myMatch.Groups[0], it would be like

"{First}[\w]+\s*{Second}[\d]+"

and then reference myMatch.Groups["First"]...

is this remotely an existing concept?

Thanks
Dan.
 
Back
Top