package require nre ?3.0? nresplit string ?regexp?
If regexp contains ``()'' then each captured string will be appended to the result after the text preceding the match. You can keep a subexpression from being appended by using ``(?:)'' instead of ``()''.
See the nrematch man page for a description of regular expressions.
This command is a super set of the standard split command. The only difference is that a regular expression is used as the splitter instead of a single set of characters.
nresplit is implemented using the nrematch command with the -split switch. See the nrematch for details on how you can create your own version of nresplit with additional features.
Copyright © 1997 Darrel Schneider.