Re: Regular Expressions in VC++
"Yogi Watcher" wrote:
Does VC++ supports regular expressions. I mean does it
come with regular
expression library or I have to buy it from somewhere?
If it is provided as part of VC++, then what library to
use?
If it is not provided then where can I buy (or get free)
regular expression
library?
You have following options if you need regular expressions
in C++ code:
1. ATL `CAtlRegExp' class. It supports decent regexp grammar
and appropriate for most tasks. Requirements: VC++ v7.x
(IIRC) and higher, ATL.
"CAtlRegExp Class"
http://msdn2.microsoft.com/en-us/library/k3zs4axe(VS.80).aspx
2. Scripting `RegExp' COM object. It supports a little bit
richer syntax than `CAtlRegExp' class. Requirements: IE5.0,
COM.
"Regular Expression Syntax (Scripting)"
http://msdn2.microsoft.com/en-us/library/1400241x.aspx
3. `boost::regex' library. It has quite rich set of features
and constantly debugged by numerous developers [hopefully].
Rumor has it that `boost::regex' library will become C++
standard eventually. Personally, I don't like it much
because it requires inclusion of huge boost library and
quite complicated in itself. However, it's the most advanced
regexp library for C++ available for free. Requirements: C++
compiler, `boost' library.
"Regular expression library, from John Maddock."
http://www.boost.org/libs/regex/index.html
4. `GRETA' library by Eric Niebler. It's part of "VC++
PowerTools" package now. `GRETA' fully supports Pearl 5
syntax. Personally, I like this library for its lightweight
size and very good performance speeds. Also, in my opinion,
it's easier to use `GRETA' library than `boost::regex'.
Requirements: C++ compiler, `GRETA' library.
"The GRETA Regular Expression Template Archive" - user's
guide
http://research.microsoft.com/projects/greta/gretauserguide.htm
"VC++ PowerTools" - download
http://www.gotdotnet.com/team/cplusplus/
Alex