From 2ca9b556d037c65b2d15f1f420521cb9618a92a7 Mon Sep 17 00:00:00 2001 From: cheng <98784021+wespc@users.noreply.github.com> Date: Fri, 7 Jul 2023 14:23:57 +0800 Subject: [PATCH] Modify the answer to Exercise 17.22. the correct output of regex index should be [2],[5],[7] --- ch17/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ch17/README.md b/ch17/README.md index 77da337..46506de 100644 --- a/ch17/README.md +++ b/ch17/README.md @@ -872,7 +872,7 @@ int main() { badNums << " " << ph; }else - formatted << " " << (*it)[2] << " " << (*it)[2] << (*it)[2]; + formatted << " " << (*it)[2] << " " << (*it)[5] << (*it)[7]; } if(badNums.str().empty()) ofs << person.name << " " << formatted.str() << endl; @@ -1464,4 +1464,4 @@ int main() return 0; } -``` \ No newline at end of file +```