-2
之间捕捉我有字符串中使用以下模式正则表达式两个字
[[at the Location ]]
[[Location at]]
[[Location]]
我想在家里我试图
var result = Regex.Match(equivalentSentense, @"\[[(.*?)\ ]]");
更换[[at the Location ]]
从例子,但这将返回第一模式任何想法如何只取代字位置,并删除]]
或[[
。
你可以提供一个样本的数据和预期的输出? –
我想知道['@“\ [[(。*?)\]]”'](http://regexstorm.net/tester?p=%5c%5b%5b(。*%3f)+%5d %5d&i =%5b%5bat + +位置+%5d%5d%0d%0a%5b%5b位置+ at%5d%5d%0d%0a%5b%5bLocation%5d%5d)可以为您返回任何内容。 –