0

Closed

Add a -RegexSeparator switch to Split-String

description

It would be nice if you could specify a regular expression as the separator e.g.:
 
gc some_textfile_of_unknown origin | split-string "(\n|\r|\r\n)" -regex
 
Underneath, String-Split would use Regex.Split instead of String.Split.
Closed Sep 28, 2006 at 5:32 AM by r_keith_hill

comments

wrote Sep 28, 2006 at 5:32 AM

Added via a couple of params: -Pattern, -CaseSensitive, -SingleLine and -MultiLine.