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!
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 ,
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!