<p>I'm looking for a robust, easy-to-use, regular expression evaluator for native C++, either platform-independent or Windows-specific.</p>

<p>Requirements:</p>

<ul>
<li>Can't use Boost or ACE regex libraries (unfortunately)</li>
<li>Can't use .NET Regex (or any managed code)</li>
</ul>

<p>The main requirement is that it should be standalone and open.</p>

[{'answer_id': 1055, 'author': 'Orion Edwards', 'author_id': 234, 'author_profile': 'https://Stackoverflow.com/users/234', 'pm_score': 4, 'selected': False, 'text': '<p>try <a href="http://www.pcre.org/" rel="noreferrer">libpcre</a></p>\n\n<p>If you\'re stuck on windows they have a windows port which should work. I know <a href="http://e-texteditor.com" rel="noreferrer">e-texteditor</a> uses it, so at least that\'s proof it works :-)</p>\n'}, {'answer_id': 1062, 'author': 'Mark Harrison', 'author_id': 116, 'author_profile': 'https://Stackoverflow.com/users/116', 'pm_score': 3, 'selected': False, 'text': '<p>The GNU C Library supports <a href="http://www.gnu.org/software/libtool/manual/libc/Regular-Expressions.html" rel="noreferrer">regular expressions</a>.  It\'s open, and the RE code seems to be easily extractable.</p>\n'}, {'answer_id': 1183, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 3, 'selected': False, 'text': '<p>The GNU C library regular expressions facility (regcomp(), regexec() and friends) is broken. Use libetre instead; the function signatures match the ones provided by glibc.\n<a href="http://laurikari.net/tre/" rel="noreferrer">http://laurikari.net/tre/</a></p>\n'}, {'answer_id': 1546, 'author': 'vzczc', 'author_id': 224, 'author_profile': 'https://Stackoverflow.com/users/224', 'pm_score': 3, 'selected': False, 'text': '<p>If you use Visual Studio you can use Visual C++ 2008 Feature Pack Release, this implements some of TR1, and includes regular expression parsing. <a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=D466226B-8DAB-445F-A7B4-448B326C48E7&amp;displaylang=en" rel="noreferrer">Get it</a></p>\n'}, {'answer_id': 7189, 'author': 'masc', 'author_id': 919, 'author_profile': 'https://Stackoverflow.com/users/919', 'pm_score': 3, 'selected': False, 'text': '<p><a href="http://qt.nokia.com/" rel="noreferrer">Qt</a> has also a nice <a href="http://en.wikipedia.org/wiki/Regular_expression" rel="noreferrer">Regular Expression</a> implementation <a href="http://qt-project.org/doc/qt-4.8/qregexp.html" rel="noreferrer">QRegExp</a>. It is also platform independent.</p>\n'}, {'answer_id': 7564, 'author': 'martinsb', 'author_id': 837, 'author_profile': 'https://Stackoverflow.com/users/837', 'pm_score': 2, 'selected': False, 'text': '<p>Why don\'t you use Microsoft ATL\'s regex library? Kenny Kerr has written a <a href="http://weblogs.asp.net/kennykerr/archive/2008/07/18/visual-c-in-short-regular-expressions.aspx" rel="nofollow noreferrer">short article</a> on that recently.</p>\n\n<blockquote>\n  <p>ATL includes a lightweight regular expression implementation. Although\n  originally part of Visual C++, it is now included with the ATL Server\n  download.</p>\n  \n  <p>The <code>CAtlRegExp</code> class template implements the parser and matching\n  engine.  ...</p>\n  \n  <p>The regular expression grammar is defined at the top of the <code>atlrx.h</code>\n  header file.</p>\n</blockquote>\n'}, {'answer_id': 7611, 'author': 'Greg Hewgill', 'author_id': 893, 'author_profile': 'https://Stackoverflow.com/users/893', 'pm_score': 3, 'selected': False, 'text': '<p>I would second the recommendation for <a href="http://pcre.org" rel="noreferrer">PCRE</a>. I have used it in C++ projects in Windows and it works great. It\'s free, even for building commercial software. It also implements something of a de facto standard regular expression language, which will be welcome to your users. PCRE is of course Perl-compatible, and Python also uses the same library.</p>\n\n<p>The native PCRE interface is a bit awkward and very C-style, so it\'s probably worth writing a nice C++ wrapper around it. There is very likely already is one out there, but I\'m not familiar with any.</p>\n'}, {'answer_id': 76358, 'author': 'Rob', 'author_id': 9236, 'author_profile': 'https://Stackoverflow.com/users/9236', 'pm_score': 2, 'selected': False, 'text': '<p>The free ATL Server Library and Tools from CodePlex includes a regex parser. See <a href="https://archive.codeplex.com/?p=atlserver" rel="nofollow noreferrer">AtlServer in the CodePlex Archive</a></p>\n\n<blockquote>\n  <p>ATL Server is a library of C++ classes that allow developers to build\n  both client and server parts of service-type C++ applications and web\n  services. It provides much of the functionality required to build\n  large scale internet sites, such as SOAP messaging, caching\n  facilities, threading facilities, regular expression processing,\n  management of session-state, performance monitoring, MIME support,\n  integration with IIS and class for interacting with security and\n  cryptographic infrastructure. The earlier versions of the library are\n  parts of Visual Studio 2002, Visual Studio 2003 and Visual Studio\n  2005. The project has started from the version of the library released as part of Visual Studio 2005 SP1.</p>\n</blockquote>\n'}, {'answer_id': 17198991, 'author': 'Gabriel', 'author_id': 2229099, 'author_profile': 'https://Stackoverflow.com/users/2229099', 'pm_score': 5, 'selected': True, 'text': '<p>C++11 now includes the support of regular expressions.\nIt will be platform independent. You just need a recent compiler.\nCheck the following list to know which one to use.</p>\n\n<p><a href="http://wiki.apache.org/stdcxx/C%2B%2B0xCompilerSupport" rel="noreferrer">http://wiki.apache.org/stdcxx/C%2B%2B0xCompilerSupport</a></p>\n\n<p>Hope it helps</p>\n'}, {'answer_id': 37100978, 'author': 'Trevor Hickey', 'author_id': 908939, 'author_profile': 'https://Stackoverflow.com/users/908939', 'pm_score': 2, 'selected': False, 'text': '<p>C++11 and forward now contains the <a href="http://en.cppreference.com/w/cpp/regex" rel="noreferrer">standard regular expression library</a>.<br>\nInclude the <code>&lt;regex&gt;</code> header, and use.</p>\n'}]
['https://Stackoverflow.com/questions/1041', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/-1/']