1
我試圖得到與此表達式相反的結果,它給了我一些麻煩。C#正則表達式排除具有隨機元素名稱的標記
Ex。
expression: (?<={{)(.*?)(?=}})
string: this is a question with a textbox {{textbox}} ok
results: textbox
尋找類似
expression: !(?<={{)(.*?)(?=}})
string:this is a question with a textbox {{textbox}} ok
results: this is a question with a textbox ok
另外,我要指出,最新的{{}}的並不總是文本框,將是隨機的字母。