Help a novice today getting started with regex.hpp
Please can someone tell me the best place to start studying how to write and use boost::regex.hpp? Is there any documentation or tutorial that is easier for a novice to understand than the standard distribution documentation?
My opinion, start with an O'Reily book on regex. Then expand from there. SGL steven.lemay@igt.com<mailto:steven.lemay@igt.com> From: Boost-users [mailto:boost-users-bounces@lists.boost.org] On Behalf Of Neil Sutton Sent: Friday, January 18, 2013 7:25 AM To: boost-users Subject: [Boost-users] Help a novice today getting started with regex.hpp Please can someone tell me the best place to start studying how to write and use boost::regex.hpp? Is there any documentation or tutorial that is easier for a novice to understand than the standard distribution documentation?
Neil Sutton <neilmsutton <at> gmail.com> writes:
Please can someone tell me the best place to start studying how to write and use boost::regex.hpp? Is there any documentation or tutorial that is easier for a novice to understand than the standard distribution documentation?
Very simple case: #define BOOST_ALL_DYN_LINK #include <boost/regex.hpp> void Test() { boost::regex rgx("12*"); bool b = false; b = boost::regex_match("12", rgx); b = boost::regex_match("12222", rgx); b = boost::regex_match("11", rgx); } If u get linking errors, pleace check my article on www.codeproject.com. For syntax of regex's (and their different flavours) probably the O' Reilly book is worth while. But perhaps above example was too simple?
Neil -- Neil Sutton <neilmsutton@gmail.com> writes:
Please can someone tell me the best place to start studying how to write and use boost::regex.hpp?
Which of these situations describes you best? 1. You already know C++ (and related build environment / tools) very well, but are new to regular expressions. 2. You already know regular expressions (as provided by one or more tools), but you are new to C++ / Boost / linking. 3. You already know both C++ and regular expressions very well, but want to know how to join the two using Boost.Regex. Depending on which situation you are in, we can provide better advice. Regards, Anthony Foiani
participants (4)
-
Anthony Foiani
-
gast128
-
Lemay.Steve
-
Neil Sutton