Getting Started with Adobe After Effects - Part 6: Motion Blur
A collection of quick technology learning tips from what people around you learn every day

Regex class supports Timeout setting in .NET 4.5

Oct 21 2011 10:08AM by Kirti M.Darji   

Regex class now support time out setting for regular expression finding match if its take long time in .net 4.5. We are able to set timeout setting with regex class in .Net 4.5 like

Regex regexpr = new Regex("[a-z ]{10}", RegexOptions.Singleline, TimeSpan.FromMilliseconds(1));

You can also specify Regex.InfiniteMatchTimeout for timeout does not occur. The value of Regex.InfiniteMatchTimeout is -1 internally so we can specify Timespan.Frommilliseconds(-1) for regular expression never timeout. This is default behavior of our regex class

Read More..   [11 clicks]

Published under: Microsoft .NET Tips ·  ·  ·  · 

Kirti M.Darji
10 · 16% · 5011


Your Comment

Sign Up or Login to post a comment.

"Regex class supports Timeout setting in .NET 4.5" rated 5 out of 5 by 6 readers
Regex class supports Timeout setting in .NET 4.5 , 5.0 out of 5 based on 6 ratings
    Copyright © Rivera Informatic Private Ltd Contact us      Privacy Policy      Terms of use      Report Abuse      Advertising      [ZULU1097]