InfiniteMatchTimeout Field
Collapse the table of content
Expand the table of content

Regex.InfiniteMatchTimeout Field

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Specifies that a pattern-matching operation should not time out.

Namespace:  System.Text.RegularExpressions
Assembly:  System (in System.dll)

public static readonly TimeSpan InfiniteMatchTimeout

The Regex class constructor and a number of static matching methods use the InfiniteMatchTimeout constant to indicate that the attempt to find a pattern match should not time out.

Caution noteCaution:

Setting the regular expression engine's time-out value to InfiniteMatchTimeout can cause regular expressions that rely on excessive backtracking to appear to stop responding when processing text that nearly matches the regular expression pattern. If you disable time-outs, you should ensure that your regular expression does not rely on excessive backtracking and that it handles text that nearly matches the regular expression pattern.

For more information about handling backtracking, see [34df1152-0b22-4a1c-a76c-3c28c47b70d8].

The InfiniteMatchTimeout constant can be supplied as the value of the matchTimeout argument of the following members:

Windows Phone OS

Supported in: 8.1, 8.0

Show:
© 2017 Microsoft