Regular Expression (Regex) Improvements - Null Value Ignore - by OmegaMan

Status : 

  External<br /><br />
		This item may be valid but belongs to an external system out of the direct control of this product team.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.


1
1
Sign in
to vote
ID 278550 Comments
Status Resolved Workarounds
Type Suggestion Repros 0
Opened 5/25/2007 9:37:12 AM
Access Restriction Public

Description

When doing a regular expression a user may get confused by the null/empty valid matches. It would be nice if there was a regular expression option such as IgnoreNullMatchesAndCaptures where any match that was null or subgroup capture that was null was not reported. If that bubbles up to where there is no data at all, then a match is not reported. If a capture has other siblings, only the null value is not returned and the siblings are faithfully reported.
Sign in to post a comment.
Posted by Microsoft on 8/28/2007 at 10:37 AM
Thanks for the feature request!

An IgnoreNullMatchesAndCaptures would be useful to add to Regex. We'll consider this for the next release of the .NET Framework after .NET 3.5.

Regards,
Justin Van Patten
CLR Program Manager