I’ve a string “This text has some (text inside parenthesis)”. So i want to retrieve the text inside the parenthesis using Regular Expressions in C#. But parenthesis is already a reserved character in regular expressions. So how to get it?
Update 1
so for the text “afasdfas (2009)”
I tried (.)/s((/d+)) and (.) (\d+) and (.*)/s((/d/d/d/d)). None of them is working. Any ideas?
You can either use backslash or Regex.Escape().