changeset 21454:ebd93e63b48e

maint: merge stable to default.
author Rik <rik@octave.org>
date Wed, 16 Mar 2016 00:17:10 -0400
parents 769f9a7c02ae (current diff) 04e0598f8b94 (diff)
children 9d1a5b22e87a
files scripts/strings/strsplit.m
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/strings/strsplit.m	Tue Mar 15 15:41:59 2016 -0400
+++ b/scripts/strings/strsplit.m	Wed Mar 16 00:17:10 2016 -0400
@@ -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<yyy", "<"), {"xxx", "yyy"})
 %!assert (strsplit ('xxx\yyy', '\'), {"xxx", "yyy"})
 
+## Bug #47403
+%!assert (strsplit ('xxx+yyy', '+'), {"xxx", "yyy"})
+
 ## Test input validation
 %!error strsplit ()
 %!error strsplit ("abc", "b", true, 4)