首页 > 解决方案 > Regex for notepad++ to exclude hyphen

问题描述

I want to do a search in notepad++ for field ProductGroup out of my data, I need to find Product which do not have - (hyphen) in their ProductGroup name. Usually these are ProductGroup names are

"ProductGroup": "Wels-RC"
"ProductGroup": "Wels-OC"
"ProductGroup": "RBE-RC"
"ProductGroup": "WXE-TN"

Can anyone help me how can I write Regular Expression to find ProductGroup's records without -?

标签: regexnotepad++

解决方案


Please try, below regex

"ProductGroup": "[^-]*?"

Regex demo


推荐阅读