Sign in to follow this  
roby65

Regex in c?

Recommended Posts

Quote:
Original post by roby65
but i can't find a library for regex.
Did you try looking for one? Apologies for what may be a slightly harsh tone, but it seems like if you'd put in any effort you should have turned something up...
Quote:
from Google search results for 'C++ regular expressions'

C++ Regular Expression Library
31 Jan 2002 - A free component that enables the use of regular expression searching in a C++ program.
www.tropicsoft.com/Components/RegularExpression/ cached - similar

Boost.Regex
28 Dec 2009 - “...one of the most highly regarded and expertly designed C++ library projects ... Introduction to using Regex with ICU · Unicode regular expression types ...
www.boost.org/doc/libs/release/libs/regex/ cached - similar


Getting started with regular expressions using C++ TR1 extensions
7 May 2008 - Getting started with regular expressions in C++ using the TR1 extension to the Standard Library. Examples comparing the C++ regular expression support to ...
www.johndcook.com/cpp_regex.html cached - similar
[...]
I'd suggest taking a look at the second result as a good potential option: Boost.Regex

Additionally, although it isn't a Regex library, depending on what you're trying to do you may find libcurl (features) useful.

Hope that helps. [smile]

Share this post


Link to post
Share on other sites
There's also boost::xpressive which is a regular expression template library rather than a traditional library like boost::regex. It's sort of like boost::spirit -- allows you to write regular expressions that are hard-coded and syntax-checked by the compiler.

Share this post


Link to post
Share on other sites
c++ has regex built in in std::tr1, if your compiler supports this (MSVC++ 08 does, not sure about others).

You can use that without having to add any additional libraries to your project.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this