我正在寻找一个正则表达式来处理选择VB代码中的注释,但不选择字符串中的单引号。而不是选择EoL(\ r \ n)
我可以得到一个正则表达式来选择前两种情况,这是我正在苦苦挣扎的第3种情况。
'select this text to end of line
Dim x As String = "do not select this text" 'select this here to end of line
Dim x As String = "do not select ' this text" 'select this here to end of line
一直在尝试Lookaheads等的许多变体。只是无法正确解决。在stacko上看到了其他一些答案,这些答案无法正常工作。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句