How to replace whitespace with notepad++ between two characters

前端 未结 2 1108
执笔经年
执笔经年 2021-02-15 11:00

I have question how to replace whitespace with _ using notepad++ regex between [] characters

Example :

sl.[Posting date]                       AS TIME, 
         


        
2条回答
  •  暗喜
    暗喜 (楼主)
    2021-02-15 11:32

    Find what: [.+(\s)+.+]

    Replace with: _

    Also don't forget to select Regular expression radio button in Search mode section.

    Update:

    Ok, I have one solution but it's dirty:

    You need to perform several replacements to do that.

    Find what: (\[.*)\s(.*\])

    Replace with: \1_\2

    Repeat using Replace all until there will be no occurrences.

提交回复
热议问题