How do you use Notepad++ regex pipe | for strings longer than one character?

后端 未结 5 2319
不知归路
不知归路 2020-12-18 18:54

I\'m trying to get notepad++ to regex find all instances of \"abc\" and \"def\" in the following sentence:

The abc went to the def.

5条回答
  •  北荒
    北荒 (楼主)
    2020-12-18 19:59

    It's nothing special about "longer than one character", Notepad++ doesn't support the | character in regex. Not even "a|d" works. See the regex help page. Version 6.1.1 of Notepad++ now supports |.

    I'd suggest using an editor with a proper regex implementation like gvim or UltraEdit.

提交回复
热议问题