Input string is something like this: OU=TEST:This001. We need extra \"This001\". Best in C#.
if the OU=TEST:
is your requirement before the string you want to match, use this regex:
(?<=OU\s*=\s*TEST\s*:\s*).*
that regex matches any length of text after the colon, whereas any text before the colon is just a requirement.
You can replace TEST
with [A-Za-z]+
to match any text other than TEST, or you can replace TEST
with [\w]+
to match any length of any combination of alphabet and numbers.
\s*
means it might be any number of whitespaces or nothing in that position, remove it if you don't need such a check.