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 36 times
1 Answers
-1
You have to escape parenthesis (there are used for grouping):
"toto \\(titi\\)"
or, with raw string (C++):
R"(toto \(titi\))"

Jarod42
- 203,559
- 14
- 181
- 302
-
find! the solution is (toto \(titi\ tata\)) – aez Apr 18 '19 at 12:15