Method ExtString.RxFindAll(+ 3 overloads)
Overload
Finds all match instances of PCRE regular expression rx.
public static IEnumerable<RXMatch> RxFindAll(this string t, string rx, RXFlags flags = 0, Range? range = null)
Parameters
t (string)
This string. |
rx (string)
Regular expression. Cannot be |
flags (RXFlags)
Options. Default 0. Flag UTF is implicitly added if rx contains non-ASCII characters and there is no flag NEVER_UTF. |
range (Range?)
Start and end offsets in the subject string. If |
Returns
IEnumerable<RXMatch>
A lazy IEnumerable<RXMatch> that can be used with |
Exceptions
ArgumentOutOfRangeException
Invalid range. |
ArgumentException
Invalid regular expression. Or used a PARTIAL_ flag. |
AuException
Failed (unlikely). |
ArgumentNullException
s is |
Remarks
More info and examples: regexp.
Overload(next)
Finds all match instances of PCRE regular expression rx. Gets array of RXMatch.
public static bool RxFindAll(this string t, string rx, out RXMatch[] result, RXFlags flags = 0, Range? range = null)
Parameters
t (string)
This string. |
rx (string)
Regular expression. Cannot be |
result (RXMatch[])
Receives all found matches. |
flags (RXFlags)
Options. Default 0. Flag UTF is implicitly added if rx contains non-ASCII characters and there is no flag NEVER_UTF. |
range (Range?)
Start and end offsets in the subject string. If |
Returns
bool
|
Exceptions
ArgumentOutOfRangeException
Invalid range. |
ArgumentException
Invalid regular expression. Or used a PARTIAL_ flag. |
AuException
Failed (unlikely). |
ArgumentNullException
s is |
Remarks
More info and examples: regexp.
Overload(next)
Finds all match instances of PCRE regular expression rx.
public static IEnumerable<string> RxFindAll(this string t, string rx, int group, RXFlags flags = 0, Range? range = null)
Parameters
t (string)
This string. |
rx (string)
Regular expression. Cannot be |
group (int)
Group number (1-based index) of results. If 0 - whole match. See also regexp.GetGroupNumberOf. |
flags (RXFlags)
Options. Default 0. Flag UTF is implicitly added if rx contains non-ASCII characters and there is no flag NEVER_UTF. |
range (Range?)
Start and end offsets in the subject string. If |
Returns
IEnumerable<string>
A lazy IEnumerable<string> that can be used with |
Exceptions
ArgumentOutOfRangeException
Invalid group or range. |
ArgumentException
Invalid regular expression. Or used a PARTIAL_ flag. |
AuException
Failed (unlikely). |
ArgumentNullException
s is |
Remarks
More info and examples: regexp.
Overload(top)
Finds all match instances of PCRE regular expression rx. Gets array of strings.
public static bool RxFindAll(this string t, string rx, int group, out string[] result, RXFlags flags = 0, Range? range = null)
Parameters
t (string)
This string. |
rx (string)
Regular expression. Cannot be |
group (int)
Group number (1-based index) of results. If 0 - whole match. See also regexp.GetGroupNumberOf. |
result (string[])
Receives all found matches. |
flags (RXFlags)
Options. Default 0. Flag UTF is implicitly added if rx contains non-ASCII characters and there is no flag NEVER_UTF. |
range (Range?)
Start and end offsets in the subject string. If |
Returns
bool
|
Exceptions
ArgumentOutOfRangeException
Invalid group or range. |
ArgumentException
Invalid regular expression. Or used a PARTIAL_ flag. |
AuException
Failed (unlikely). |
ArgumentNullException
s is |
Remarks
More info and examples: regexp.