Or(element, selector, comparer) Or(elements, selector, comparer) ThenExpect<>(expectation, selector, exceptionGenerator) ThenExpect<>(expectation, selector, exceptionGenerator)
Legend Class Struct Enum Interface Delegate | Constructor Method Property Event Field |
| Method: Stringerex<TCombinedResult> And<TOtherResult, TOtherGenerex, TOtherGenerexMatch, TCombinedResult>(GenerexWithResultBase<char, TOtherResult, TOtherGenerex, TOtherGenerexMatch>, Func<TResult, TOtherGenerexMatch, TCombinedResult>)Declarationpublic Stringerex<TCombinedResult> And<TOtherResult, TOtherGenerex, TOtherGenerexMatch, TCombinedResult>(
GenerexWithResultBase<char, TOtherResult, TOtherGenerex, TOtherGenerexMatch> other,
Func<TResult, TOtherGenerexMatch, TCombinedResult> selector
) Summary
Returns a regular expression that only matches if the substring matched by this regular expression also
contains a match for the specified other regular expression, and if so, combines the first match’s result
object with the second match using a specified selector. Generic type parametersTOtherResult |
The type of the result object associated with each match of other. | TOtherGenerex |
The type of the other regular expression. (This is either Generex<T, TResult> or Stringerex<TResult>.) | TOtherGenerexMatch |
The type of the match object for the other regular expression. (This is either GenerexMatch<T, TResult> or StringerexMatch<TResult>.) | TCombinedResult |
The type of the combined result object returned by selector. |
ParametersGenerexWithResultBase<char, TOtherResult, TOtherGenerex, TOtherGenerexMatch> | other |
A regular expression which must match the substring matched by this regular expression. | Func<TResult, TOtherGenerexMatch, TCombinedResult> | selector |
A selector function that combines the result object associated with the match of this regular expression, and
the match of other, into a new result object. |
Remarks
It is important to note that a.And(b) is not the same as b.And(a) . See GenerexBase<T, TMatch, TGenerex, TGenerexMatch>.And<TOtherGenerex, TOtherGenerexMatch>(GenerexNoResultBase<T, TOtherGenerex, TOtherGenerexMatch>) for an example.
The value of the GenerexMatch<T>.Index property of the match object passed into selector refers to the index within the substring, not the index within the original input
sequence. |