PDF Mikata

如何刪除每行前後的空格

釋出日期:2026 年 10 月 19 日|最後更新:2026 年 10 月 19 日|關於(日文)

要點
  • 貼上
  • 刪除空格
  • 複製

If a copied list has invisible spaces at the start or end of lines, even identical content is judged as different lines. "Remove spaces at the start and end of lines" in Remove Duplicate Lines and Sort a List takes them out.

步驟

  1. Paste the list into "Before tidying (one per line)".
  2. Tick "Remove spaces at the start and end of lines".
  3. If needed, also choose "Remove duplicate lines" and "Remove empty lines".
  4. Check "After tidying" and copy with "Copy result".
It removes spaces at the start and end of lines. Spaces between characters are not removed.

Why spaces get in

Kinds of spaces

Some are hard to see.

Why combine with duplicates

"Yamada Taro" and "Yamada Taro " (trailing space) are treated as different lines and not seen as duplicates. Removing the spaces first makes them the same line so the duplicate can be removed.

Spaces between characters

To remove spaces inside a line, use a text editor with find-and-replace or the tool that tidies full-width and half-width.

適合

示例

Merging two rosters found no duplicates. Trailing spaces were the cause; after choosing "Remove spaces at the start and end of lines", 15 duplicate lines were found.

Common stumbling blocks

Frequently asked questions

Are full-width spaces removed too?

Yes. Spaces at the start and end of lines, including full-width, are removed.

小結

Remove surrounding spaces before a duplicate check. Invisible spaces hide duplicates.

使用「刪除重複行並排序」(免費)

搭配使用的工具

如果這篇教程對你有幫助,一點小小的打賞會讓我們非常開心。

打賞(300 日元)贈送禮物(亞馬遜心願單)

此工具的更多教程

檢視全部教程