7

I'm looking for a good open source C/C++ regular expression library that has full Unicode support.

I'm using this in an environment where the library might get ASCII, UTF-8, or UTF-16. If it gets UTF-16 it might or might not have the necessary quoting characters (FF FE) or (FE FF).

I've looked around and there don't seem to be any options other than PCRE.

My second problem is that I'm currently using flex to build some HUGE regular expressions. Ideally I would have a flex-like lexical expression generator that also handles Unicode.

Any suggestions?

Lesmana
  • 25,663
  • 9
  • 82
  • 87
vy32
  • 28,461
  • 37
  • 122
  • 246
  • 1
    possible duplicate of [Qt/C++ regular expression library with unicode property support](http://stackoverflow.com/questions/2820367/qt-c-regular-expression-library-with-unicode-property-support) – Nathan Osman Feb 23 '11 at 05:16

2 Answers2

9

Have you considered ICU?

It has mature regular expression support.

John Weldon
  • 39,849
  • 11
  • 94
  • 127
0

I believe Boost Spirit and Boost Regex both have at least some degree of Unicode support.

Jerry Coffin
  • 476,176
  • 80
  • 629
  • 1,111