PC Review


Reply
Thread Tools Rate Thread

Re: regex result

 
 
Mike Blake-Knox
Guest
Posts: n/a
 
      4th Sep 2005
In article <ev3CpU#(E-Mail Removed)>, Jg wrote:
> is it OK to get regex result of pattern which has duplicate reference names
> like
> StrDatePattern As String
> ="\b(((?<year>\d{4})-(?<month>\d{1,2})-(?<day>\d{2}))|{(?<month>\d{1,2})
> (?<day>\d{2}), (?<year>\d{4})))"?
>

Yes. In this case, once you've debugged the regular expression, you'll find
that each named capture is matched at most one time by the pattern. The .NET
will also handle multiple matches.

I'd suggest running your regular expression through a tool (like the online one
at http://www.regexlib.com/RETester.aspx) so you can see what's happening
visually.

Hope this helps.

Mike

PS: It's good practice to have checked at least the syntactic validity of your
code before you post.



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Regex: different options on different sections of the Regex? Ethan Strauss Microsoft C# .NET 4 11th Jul 2008 04:54 PM
Regex match excluding search string in result: jobs Microsoft ASP .NET 2 9th Aug 2007 06:49 PM
Is there a good way to turn regex patterns into properly-escaped c# regex patterns? sherifffruitfly Microsoft C# .NET 3 11th Feb 2007 10:56 AM
Is ASP Validator Regex Engine Same As VS2003 Find Regex Engine? =?Utf-8?B?SmViQnVzaGVsbA==?= Microsoft ASP .NET 2 22nd Oct 2005 04:43 PM
regex result question gs Microsoft VB .NET 0 4th Sep 2005 03:06 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:26 AM.