views:

582

answers:

8

Does it? If yes, where can I get the documentation for it... if not, then which would be the best alternative?

+17  A: 

C++ does not have a standard regex library.

Your best alternative would probably be boost regex - a lot of the boost library has made it into the standards discussions for C++0x so it's probably the closest to "standard" that you will get.

Edit: As others have pointed out, Boost::Regex is actually one of the boost libraries slated to go into C++0X, so if all goes according to plan it should actually become the "c++ standard regex library".

MadKeithV
+4  A: 

Check the boost regex library. It should become part of the standard with C++0x.

Paolo Tedesco
+5  A: 

Under UNIX-like systems you can use POSIX regex functions.

che
+3  A: 

If by standard you mean bundled with compiler, then not. But most of the other languages that bundle regex extension use pretty standard c implementations. E.g. PCRE - Perl Compatible Regular Expression and C libraries have POSIX regex support (see man page).

Michael Krelin - hacker
+5  A: 

The Microsoft Visual C++ 2008 Feature Pack 1 (now rolled into the Visual Studio 2008 Service Pack 1) contains a implementation of the 'official' TR1 reg ex types. Knock yourself out :-)

Tom Kirby-Green
A: 

+1 for PCRE - Perl Compatible Regular Expression , I remembered using Mircosoft's GRETA as well.

TuxGeek
+2  A: 

Regular Expressions are part of the C++ extension TR1. Dinkumware, visual studio and others already have implemented this. See

Quick Start for C++ TR1 Regular Expressions

Visual C++ 2008 Feature Pack

RED SOFT ADAIR
A: 

Qt, from Trolltech, also has a regex implementation which I find very easy to use. However, if you are not planning of using Qt for anything else I would use Boost.Regex as you probably would be good off using Boost for other purposes as well.

larsm