Home  >  Article  >  Development Tools  >  notepad++ regular expression to replace multiple spaces with one comma

notepad++ regular expression to replace multiple spaces with one comma

藏色散人
藏色散人forward
2021-01-22 14:52:155154browse

The following is the notepadtutorial column to introduce notepad regular expressions to replace multiple spaces with a comma. I hope it will be helpful to friends in need!

notepad++ regular expression to replace multiple spaces with one comma

Goal: Replace multiple spaces between two texts with a comma. (To process CSV data)

Open notepad and press Ctrl h to bring up the Replacement window. Select the regular expression of the search mode.

The search target is: [ ] Replace with ,
利用notepad++正则表达式将 多个空格 替换为一个逗号

##After inputting, click

Replace all

Regular expressions for other whitespace type characters:

\s 表示空白字符。包括,空格,制表符等
“ ” 只表示空格。
\s+ 可匹配至少一个空白字符。
[ ]+ 只表示多个空格。

The above is the detailed content of notepad++ regular expression to replace multiple spaces with one comma. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:csdn.net. If there is any infringement, please contact admin@php.cn delete