CustomerAccount, CustomerName(PayType), Address, (Amount)
我正在尝试使用 notedpad++ 找到一种方法来从上面的示例中删除 (PayType)。支付类型始终是第一组括号,但有些行中的括号中也有负数。
答案1
- Ctrl+H
- 找什么:
^[^(]+\K\([^)]+\)
- 用。。。来代替:
LEAVE EMPTY
- 检查环绕
- 检查正则表达式
- Replace all
解释:
^ : begining of line
[^(]+ : 1 or more character that is not an open parenthesis
\K : forget all we have seen until this position
\( : an open parenthesis
[^)]+ : 1 or more character that is not a close parenthesis
\) : a close parenthesis
给定示例的结果:
CustomerAccount, CustomerName, Address, (Amount)