Regex find instance of dash, but not dash

后端 未结 3 1436
南笙
南笙 2021-01-18 13:06

I am sooo close. I am trying code a regex expression for Notepad++ to replace a dash with a space, ignoring dashes already with a pre/post space. I realize I could

3条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-18 13:50

    Use \w(-)\w to replace all hyphens surrounded by alphabetic characters, digits and underscores, or [^ ](-)[^ ] to replace all hyphens surrounded by non-space characters.

    Both work fine in my Notepad++ version with all of your examples.

提交回复
热议问题