Use capture in pattern?
With this pattern I can match this text
Patern:
"abc\(.*?\)abc"
Text:
"abc(" "")abc"
What if I want the user to decide how to start and end it. Instead of abc
it could be anything
Pattern:
"(.*?)\(.*?\)$1"
Text:
"def(" "")def"
Except this doesn't work because it appears $ means end of line and not
match with group 1. Is it possible to match the way I want with regex in
.NET?
No comments:
Post a Comment