Attention: We are retiring the ASP.NET Community Blogs. Learn more >

RegexLib Testing Tool - The new Details Grid

The other day I blog'ged about the new Options panel and today I'd like to announce another part of the expanded testing tools - the Details Grid:

The new Details Grid on RegexLib.com

Initially, the Details Grid displays information about Matches however, you can expand each Match out to view detailed information about the Groups within the Match.

At the Group level of data you are presented with all of the useful diagnostic information about the regex's matching behaviour such as:

  • Value : the captured value of a Group. In the case where a group has sub-captures, the Value is equivalent to the value of the last Capture in the Group.
  • Index : where the capture commenced in the input string.
  • Length : the length of the Value. This is useful when the value contains whitespace or unprintable characters.
  • Grp. Num. : The position of the Group within the Match. This is the number returned from regex.GetGroupNumbers (Refer Extra Information below). It is important to note that Named Groups *always* occur last. That is, no matter where your named group actually occurs within a match, it will always appear at the end of the Matches Groups collection.
  • Name : This is the name of the Group. This is the name returned from regex.GroupNameFromNumber( grpNum ).
  • Captures : This field lets you know whether there are sub-captures for this Group. If there are and you want to see their values, you can switch to TreeView mode and view the contents of the entire Match/Group/Capture hierarchy.

Extra Information

Regex: Functionality about named/numbered groups everyone should know.

No Comments