我有一些字符串:
new_account_notification
updated_account_notification
reactivated_account_notification
updated_billing_info_notification
Run Code Online (Sandbox Code Playgroud)
我想匹配这些字符串:
accountreactivated_accountbilling_info请建议正则表达式来满足这些条件.
试试这种模式:
(?<!reactivated_)account|billing_info
Run Code Online (Sandbox Code Playgroud)
(?<!...) 是负面的看法(希望你的正则表达式支持它)
| 代表OR