Searching for line breaks in MadEdit-Mod

  之前有寫一篇「In wxMEdit(MadEdit)Searching for line breaks」,Just happened to encounter the same need today,Now I've actually switched from wxMEdit to MadEdit-Mod,Basically the same,就用文章提到的「正規運算式」來搜尋 \n 並取代。奇怪的是搜尋到了,也取代了,但結果換行符號還是存在,且再搜尋一次 \n 就找不到了。

  後來在 MadEdit-Mod 的 Issue 討論串剛好看到作者有提到這個現象這是因為 Windows 系統的換行符號應該要是 \r\n蘋果則是 \r而我只取代掉 \n就剩下 \r然後 MadEdit 又支援 \r才會仍然看到換行的結果卻再也搜尋不到 \n

  不過其實細看換行符號貼心的 MadEdit 其實還是有用不同的圖案來表示 \r\n\r And \n 這三種情況

\r\n

\r

\n

  因此只要視情況輸入正確的換行符號,即可針對換行做處理。

[Related Links]

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.