split a string on a regular expression
RegSplit( pattern, text )
string; regular expression
string; string to split
The RegSplit(pattern, text) command splits a string text at substrings matching the regular expression pattern. The sequence of substrings of text that remain after substrings of text that match pattern have been elided is returned.
Splitting the empty string on any regular expression yields the expression sequence NULL.
If the regular expression pattern matches the empty string, an exception is raised.
Empty strings may result when adjacent matches to pattern occur within text. These can be removed as shown in the examples below.
Use StringTools[Split] to split a string at any of a set of characters. (See the examples, below.) Although this can be accomplished with RegSplit, StringTools[Split] is more efficient for this special case.
RegSplit⁡(\.|,|;),The Levi-Civita theorem provides a straightforward test for separability; however, because it is only a local characterization, it does not, in general, aid in the determination of separable coordinates.
The Levi-Civita theorem provides a straightforward test for separability, however, because it is only a local characterization, it does not, in general, aid in the determination of separable coordinates
Error, (in StringTools:-RegSplit) empty string would match
You can remove unwanted empty strings as follows.
Download Help Document
What kind of issue would you like to report? (Optional)
Thank you for submitting feedback on this help document. Your feedback will be used
to improve Maple's help in the future.