Question

I'm interested in a basic Regex library. I believe I can use C++ TR1. During the research, similar answers claim C++ TR1 is provided by Boost (some hand waiving).

Perhaps I am missing something, but I did not see an acknowledgement of Boost by the C++ technical committee and I doubt Microsoft, Dinkumware, etc are using it in their implementations. Looking at GCC sources, I'm not even sure GCC is using Boost libraries.

Can anyone point to a reference for the claims that TR1 Regex is provided by Boost?

Jeff

Was it helpful?

Solution

TR1 is not provided by boost. But boost has own TR1 realisation. http://www.boost.org/doc/libs/1_47_0/doc/html/boost_tr1.html

The TR1 library provides an implementation of the C++ Technical Report on Standard Library Extensions. This library does not itself implement the TR1 components, rather it's a thin wrapper that will include your standard library's TR1 implementation (if it has one), otherwise it will include the Boost Library equivalents, and import them into namespace std::tr1.

OTHER TIPS

TR1 Regex is not provided by Boost. TR1 will be provided by your implementation. However, TR1 was mostly based on stuff from the Boost libraries. Many contributors to Boost happen to be C++ standard committee members, so Boost is often used as a testing ground for future adoption into the C++ standard library. However, TR1 is quite old now, and most implementations have moved everything into their standard libraries, so there is not much reason to use stuff in the TR1 namespace unless for backward compatibility.

I'd recommend PCRE. It is a very mature, robust and powerful open source C library regex engine written by Phillip Hazel and used by many notable projects such as PHP, Apache, KDE, Safari etc. There is a C++ wrapper available.

See: PCRE - Perl Compatible Regular Expressions

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top