更新时间:2022-06-09 08:27:45
您可以按如下方式使用If-Then-Else:
(_)?R(?(1)_?|_)
Demo。
这使您可以只写入R
一次。
明细:
(_)? # An optional capturing group that matches an underscore character.
R # Matches 'R' literally (replace it with your pattern).
(? # If...
(1) # ..the first capturing group is found,...
_? # ..then match zero or one underscore characters (optional).
| # Else (otherwise)...
_ # Match exactly one underscore character (required).
) # End If.
在记事本++中工作: