Declaration
public TOtherGenerex ThenExpect<TOtherGenerex, TOtherResult, TOtherGenerexMatch>(
Func<TGenerexMatch, GenerexWithResultBase<T, TOtherResult, TOtherGenerex, TOtherGenerexMatch>> selector,
Func<TGenerexMatch, Exception> exceptionGenerator
)
Summary
Returns a regular expression that matches this regular expression, then uses a specified
selector to create a new regular expression from the match; then attempts to match the new regular
expression and throws an exception if that regular expression fails to match. The new regular expression’s
result object replaces the current one’s.
Generic type parameters
TOtherGenerex | This type parameter is not documented. |
TOtherResult | This type parameter is not documented. |
TOtherGenerexMatch | This type parameter is not documented. |
Parameters
Func<TGenerexMatch, GenerexWithResultBase<T, TOtherResult, TOtherGenerex, TOtherGenerexMatch>> | selector |
The selector that generates a new regular expression, which is expected to match after the current one. |
Func<TGenerexMatch, Exception> | exceptionGenerator |
A selector which, in case of no match, generates the exception object to be thrown. |
Returns
The resulting regular expression.
Remarks
Regular expressions created by this method cannot match backwards. The full set of affected methods is listed
at
GenerexBase<T, TMatch, TGenerex, TGenerexMatch>.Then<TOtherGenerex, TOtherMatch, TOtherGenerexMatch>(Func<TGenerexMatch, GenerexBase<T, TOtherMatch, TOtherGenerex, TOtherGenerexMatch>>).