regex? Ok to submit simpler examples?
<alert comment="boost and regex newbie"> Thanks for providing and supporting boost::regex. Maybe I'm the only one who finds the provided examples perhaps a bit complicated to get "up to speed" ... much of the source code is parsing the command line and then reading in a file and getting everything set up to do rather advanced functionality (or at least it seems that way to this boost newbie). I'd appreciate examples that are more "baby steps with training wheels" showing how to do the equivalent of "Hello, world". Something something like the following for regex_replace? void how_to_use_replace() { string contents("String has © twice © to be replaced."); boost::regex reg("©"); contents = boost::regex_replace(contents, reg, "©"); cout << contents << endl; // assert (contents == "String has © twice © to be replaced"); } I realize there are simpler ways to accomplish this replacement (like std::string.replace) and the above might not be "best practice", but these kind of "barebones" examples might help "flatten" the learning curve for this terrific library. </alert>
participants (1)
-
Lynn Allan