
Sudarshan Gaikaiwari wrote:
Hello Boost Experts
Here is my situation.
Users write regular expressions which act as input to our programs and are used to perform matches. Currently the code base is Java and uses the java.util.regex package to handle regular expressions. I need to convert this code to C++ and intend to use boost regex.
How compatible is boost regex with Java regex? I have looked at Java regex documentation here http://java.sun.com/j2se/1.5.0/docs/api/java/util/regex/Pattern.html
to note the differences between Java regex and Perl 5 regexs. Are these the only with boost regex also?
Try comparing to the Boost.Regex reference docs here: http://svn.boost.org/svn/boost/trunk/libs/regex/doc/html/boost_regex/syntax/... Things I noticed are: \u has a different meaning (use Perl-style \x{DDDDD} instead). \p{javaLowerCase} obviously isn't supported. \p{InGreek} isn't supported, but \p{Lu} is in the Unicode aware u32regex type. X*+ not supported (as with Perl). I'm not familiar with Java's regex package so this is almost certainly not definitive! HTH, John.