On Fri, 24 Jun 2011 00:35:45 +0200, Eike Rathke <[email protected]> wrote:
Hi Pedro,
On Thursday, 2011-06-23 12:39:49 -0700, Pedro F. Giffuni wrote:
OpenOffice has a C++ interface to GNU regex so Google's
RE2 seemed like a natural fit there. Unfortunately I see
TextSearch::RESrchBkwrd in textsearch.cxx so I assume we
need backreferences. The Re2 website says:
"If you absolutely need backreferences and generalized
assertions, then RE2 is not for you, but you might be
interested in irregexp, Google Chrome's regular expression
engine."
I strongly propose to go for ICU's RE instead. OOo already makes
heavy
use of ICU, the ICU REs support Unicode conforming to TR18
http://www.unicode.org/reports/tr18/ and seem to have all we need.
See
http://userguide.icu-project.org/strings/regexp
Eike
Thanks for the excellent suggestion Eike!
+1 For code deduplication.
I understand we also have some C++ experts from (ahem) IBM so
we can always point to them for any issue that arises ;-).
Pedro.