Paul J. Lucas has proposed merging lp:~paul-lucas/zorba/pjl-misc into lp:zorba.

Commit message:
Fixed [] regex bug.

Requested reviews:
  Paul J. Lucas (paul-lucas)

For more details, see:
https://code.launchpad.net/~paul-lucas/zorba/pjl-misc/+merge/199205

Fixed [] regex bug.
-- 
https://code.launchpad.net/~paul-lucas/zorba/pjl-misc/+merge/199205
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'src/util/icu_regex.cpp'
--- src/util/icu_regex.cpp	2013-09-17 19:30:18 +0000
+++ src/util/icu_regex.cpp	2013-12-16 23:47:31 +0000
@@ -135,7 +135,7 @@
   return ztd::peek_behind( s, &i ) == '?' && ztd::peek_behind( s, &i ) == '(';
 }
 
-//#define DEBUG_CONVERT_REGEX
+#define DEBUG_CONVERT_REGEX
 
 #define IS_CHAR_RANGE_BEGIN (in_char_class && is_char_range_begin( xq_re, i ))
 #define PEEK_C              ztd::peek( xq_re, i )
@@ -513,8 +513,10 @@
           else {
             if ( !in_char_class )
               goto unbalanced_char;
-            if ( put_close_bracket )
+            if ( put_close_bracket ) {
               *icu_re += ']';
+              put_close_bracket = false;
+            }
             --in_char_class;
             in_char_range = 0;
           }

=== added file 'test/rbkt/ExpQueryResults/zorba/string/Regex/regex_m56.xml.res'
--- test/rbkt/ExpQueryResults/zorba/string/Regex/regex_m56.xml.res	1970-01-01 00:00:00 +0000
+++ test/rbkt/ExpQueryResults/zorba/string/Regex/regex_m56.xml.res	2013-12-16 23:47:31 +0000
@@ -0,0 +1,1 @@
+true

=== added file 'test/rbkt/Queries/zorba/string/Regex/regex_m56.xq'
--- test/rbkt/Queries/zorba/string/Regex/regex_m56.xq	1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/string/Regex/regex_m56.xq	2013-12-16 23:47:31 +0000
@@ -0,0 +1,1 @@
+fn:matches( "a...@28.io", "^[^@]+@[^\.]+\.[a-z]+$" )

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to     : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp

Reply via email to