Jump to content
  • Advertisement
Sign in to follow this  
roby65

Regex in c?

This topic is 3052 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, i need to parse an html response in c/c++ with the regular expressions, but i can't find a library for regex. Can someone help me?

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by roby65
Hi,
i need to parse an html response in c/c++ with the regular expressions, but i can't find a library for regex.
Can someone help me?


Try PCRE. :)

Share this post


Link to post
Share on other sites
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!