Suppose I have a string with the following pattern: a bunch of text I don't care about, followed by some text that is enclosed in "[" and "]". Within the enclosed space, I have some text enclosed in "(" and ")". This second set of text I want to get rid of. At the end, I'd like to have returned the stuff within the first enclosing, which I'll then replace with new text:
Blah [(remove)Field:(remove)Name(remove)] Blah
What I'd like to get returned from that above example would be the following (in two steps to make it more clear):
First:
Blah [Field:Name] Blah
Then:
Blah ReplacedText Blah
How would I do this with a Regex.Replace?
** EDIT **
In fact, ideally, if I could actually get back the value "Name" in the above example, for my replacing, it would be even better. So in other words, replace [Field:Name] with a value, but obtain "Name" in a group as well.