Created
July 8, 2015 11:23
-
-
Save peters/8dd900ab8a8e5af17aa3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/openalpr/postprocess/regexrule.cpp b/src/openalpr/postprocess/regexrule.cpp | |
index c4bf857..be2871f 100644 | |
--- a/src/openalpr/postprocess/regexrule.cpp | |
+++ b/src/openalpr/postprocess/regexrule.cpp | |
@@ -75,11 +75,11 @@ namespace alpr | |
} | |
else if (utf_character == "@") | |
{ | |
- this->regex = this->regex + "\\p{Alpha}"; | |
+ this->regex = this->regex + "\p{Alpha}"; | |
} | |
else if (utf_character == "#") | |
{ | |
- this->regex = this->regex + "\\p{Digit}"; | |
+ this->regex = this->regex + "\p{Digit}"; | |
} | |
else if ((utf_character == "*") || (utf_character == "+")) | |
{ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Doing that disables the pattern matching, unfortunately. It sounds like it may be a bug in the Regex library... one that will be very difficult to troubleshoot. I added a minor change today (using stringstream to build the regex rather than concatenating strings). I doubt that will help, but worth a shot. At least it's slightly more efficient.