标签: c# .net regex
我有一句话,例如“$[inception]$是一部令人难以置信的电影”。我想通过分隔符“$[...]$分割”起始“。我想知道真正有能力做的正则表达式模式这一点。
$[inception]$
$[...]$
答案 0 :(得分:0)
正则表达式:
\$\[(.*?)\]\$
示例C#代码:
Regex.Match("the $[inception]$ is an incredible movie", "\\$\\[(.*?)\\]\\$").Groups[1]