$zxx$的正则怎么写???
$zxx$的正则怎么写???
------解决方案--------------------什么意思?
/^\$[a-z]{3}$\
------解决方案--------------------$在正则表达式中有特殊意义,要匹配$本身,需要转义
@ "\$(\S{2,15})\$ "
------解决方案--------------------匹配$$之间的内容:Regex.Match( "$zxx$ ", "$(? <content> .*?)$ ").Groups[ "content "].Value
匹配$zxx$:Regex.Match( "$zxx$ ", "$zxx$ ")
------解决方案--------------------匹配$$之间的内容:Regex.Match( "$zxx$ ", "\$(? <content> .*?)\$ ").Groups[ "content "].Value
匹配$zxx$:Regex.Match( "$zxx$ ", "\$zxx\$ ")
------解决方案--------------------x=Regex.Replace(x, "\$[^\$]*\$ ", " ")