Could someone explain the differences between the two? Which would be better to learn right now? How would knowledge transfer from one to the other and vice-versa?
Boost. Regex allows you to use regular expressions in C++. As the library is part of the standard library since C++11, you don't depend on Boost. Regex if your development environment supports C++11.
The current std::regex design and implementation are slow, mostly because the RE pattern is parsed and compiled at runtime. Users often don't need a runtime RE parser engine as the pattern is known during compilation in many common use cases. I think this breaks C++'s promise of “don't pay for what you don't use.”
C++11 uses ECMAScript grammar as the default grammar for regex. ECMAScript is simple, yet it provides powerful regex capabilities.
The boost regex library made it into C++0x so I'm guessing it will slowly be removed from boost. However, using boost is nice because you can still use it with compilers without C++0x support. So it's really up to you.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With