Notepad++ 记事本中包含符号的单词前的新行++;

Notepad++ 记事本中包含符号的单词前的新行++;,notepad++,line,symbols,Notepad++,Line,Symbols,我得到了多行文字,文字中包含“)”符号。我想在每个单词前面加一行“)” 例如,我得到: 我想这样做: citrix) 1820193 youtrix) 18337 allow) 29318 gone) 89 lise) 192 top) 192 citrix) 1820193 youtrix) 18337 allow) 29318 gone) 89 lise) 192 top) 192 按Ctrl+H打开替换对话框 在搜索模式中,选择正则表达式 在查找内容:,输入(\d)\h 在替换为:

我得到了多行文字,文字中包含“)”符号。我想在每个单词前面加一行“)”

例如,我得到:



我想这样做:

citrix) 1820193
youtrix) 18337
allow) 29318
gone) 89
lise) 192
top) 192
citrix) 1820193
youtrix) 18337
allow) 29318
gone) 89
lise) 192
top) 192

按Ctrl+H打开替换对话框

搜索模式中
,选择
正则表达式

查找内容:
,输入
(\d)\h

替换为:
中,输入
\1\n

点击“全部替换”

注:只有当列表是数字时,这才有效。如果要对一些非数字列表执行此操作,则必须在
查找内容:
中输入
([^\)]\h

祝你好运

  • Ctrl+H
  • 查找内容:
    \h+(?=\w+\)
  • 替换为:
    \n
    \r\n
    ,具体取决于您的需要
  • 检查环绕
  • 检查正则表达式
  • 全部替换
说明:

\h+         : 1 or more horizontal spaces
(?=         : start lookahead, make sure we have after
    \w+     : 1 or more word character. You may use \S+ if have other characters than word character.
    \)      : a closing parenthesis
)           : end lookahead
\n          : linefeed (you may use \r\n depending on your needs)
更换:

\h+         : 1 or more horizontal spaces
(?=         : start lookahead, make sure we have after
    \w+     : 1 or more word character. You may use \S+ if have other characters than word character.
    \)      : a closing parenthesis
)           : end lookahead
\n          : linefeed (you may use \r\n depending on your needs)
给定示例的结果:

\h+         : 1 or more horizontal spaces
(?=         : start lookahead, make sure we have after
    \w+     : 1 or more word character. You may use \S+ if have other characters than word character.
    \)      : a closing parenthesis
)           : end lookahead
\n          : linefeed (you may use \r\n depending on your needs)