# HG changeset patch # User Lachlan Andrew # Date 1458028928 -39600 # Node ID 04e0598f8b94f89e3bf1e4f6dd5c3d3503e350f6 # Parent 882cb9f032cef55267f4c20a94f383c5eebd8200 Allow strsplit to use '+' as a delimiter (bug #47403). * strsplit.m: Add '+' to regexprep call to escape characters that have special meaning in regexp. diff -r 882cb9f032ce -r 04e0598f8b94 scripts/strings/strsplit.m --- a/scripts/strings/strsplit.m Thu Mar 10 15:38:31 2016 -0500 +++ b/scripts/strings/strsplit.m Tue Mar 15 19:02:08 2016 +1100 @@ -196,7 +196,7 @@ del = do_string_escapes (del); endif ## Escape characters which have a special meaning in regexp. - del = regexprep (del, '([{}()[\]^$.*?|\\])', '\\$1'); + del = regexprep (del, '([{}()[\]^$.*?+|\\])', '\\$1'); endif if (isempty (str)) @@ -301,6 +301,9 @@ %!assert (strsplit ("xxx