I have a question about using regexp to match a parentheses in TCL.
For example I have a string like this:
yes, it is (true, and it is fine).
I just want to match this part yes, it is (true
, how to match it?
I have a question about using regexp to match a parentheses in TCL.
For example I have a string like this:
yes, it is (true, and it is fine).
I just want to match this part yes, it is (true
, how to match it?
You can enclose parentheses in a character class as @bobah suggests,
But it's more common to escape it:
But if you're escaping it, make sure you understand that you must either do this:
or this: