openfoam/applications/test/regex
Mark Olesen 12aa2d3c30 ENH: SubStrings::str(int) method for similarity with std::smatch
- define regExp::results_type using SubStrings container for handling
  groups. This makes a later shift to std::smatch easier, but changes
  the regExp API for matching with groups. Previously had list element
  0 for regex group 1, now list element 0 is the entire match and list
  element 1 is regex group 1.

  Old:
      List<std::string> mat;
      if (re.match(text, mat))  Info<< "group 1: " << mat[0] << nl;

  New:
      regExp::results_type mat;
      if (re.match(text, mat))  Info<< "group 1: " << mat.str(1) << nl;
2018-01-17 00:15:36 +01:00
..
Make
Test-regex.C ENH: SubStrings::str(int) method for similarity with std::smatch 2018-01-17 00:15:36 +01:00
testRegexps ENH: SubStrings::str(int) method for similarity with std::smatch 2018-01-17 00:15:36 +01:00