why regex_search(line, smatch, tofind)
don't find the expression
"toto (titi)"
because of the bracket? Without bracket it works. How to remplace ( by a pattern that match this?
Asked
Active
Viewed 35 times
1 Answers
-1
You have to escape parenthesis (there are used for grouping):
"toto \\(titi\\)"
or, with raw string (C++):
R"(toto \(titi\))"
![](../../users/profiles/2684539.webp)
Jarod42
- 173,454
- 13
- 146
- 250
-
find! the solution is (toto \(titi\ tata\)) – aez Apr 18 '19 at 12:15