zorba-coders team mailing list archive
-
zorba-coders team
-
Mailing list archive
-
Message #26447
[Merge] lp:~paul-lucas/zorba/pjl-misc into lp:zorba
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@xxxxx", "^[^@]+@[^\.]+\.[a-z]+$" )
Follow ups
-
[Merge] lp:~paul-lucas/zorba/pjl-misc into lp:zorba
From: noreply, 2013-12-17
-
[Merge] lp:~paul-lucas/zorba/pjl-misc into lp:zorba
From: Zorba Build Bot, 2013-12-17
-
[Merge] lp:~paul-lucas/zorba/pjl-misc into lp:zorba
From: Zorba Build Bot, 2013-12-17
-
Re: [Merge] lp:~paul-lucas/zorba/pjl-misc into lp:zorba
From: Matthias Brantner, 2013-12-17
-
[Merge] lp:~paul-lucas/zorba/pjl-misc into lp:zorba
From: Zorba Build Bot, 2013-12-17
-
[Merge] lp:~paul-lucas/zorba/pjl-misc into lp:zorba
From: Zorba Build Bot, 2013-12-17
-
[Merge] lp:~paul-lucas/zorba/pjl-misc into lp:zorba
From: Zorba Build Bot, 2013-12-17
-
[Merge] lp:~paul-lucas/zorba/pjl-misc into lp:zorba
From: Zorba Build Bot, 2013-12-16
-
[Merge] lp:~paul-lucas/zorba/pjl-misc into lp:zorba
From: Paul J. Lucas, 2013-12-16
-
Re: [Merge] lp:~paul-lucas/zorba/pjl-misc into lp:zorba
From: Paul J. Lucas, 2013-12-16