Method ExtString.RxSplit
Overload
Returns an array of substrings that in this string are delimited by regular expression matches.
public static string[] RxSplit(this string t, string rx, int maxCount = 0, RXFlags flags = 0, Range? range = null)
Parameters
t (string)
This string. |
rx (string)
Regular expression. Cannot be |
maxCount (int)
Maximal count of substrings to get. The last substring contains the unsplit remainder of the subject string. If 0 (default) or negative, gets all. |
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
string[] |
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.