Regular expression: Difference between revisions

From LemonWiki共筆
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
將Email清單,轉成Email軟體可以使用的寄信名單 (取代換行符號)
== 將Email清單,轉成Email軟體可以使用的寄信名單 (取代換行符號) ==
<pre>
<pre>
原  
原  
Line 10: Line 10:
</pre>
</pre>


== 方案1 ==
=== 方案1: EmEditor ===
使用[http://www.emeditor.com/ EmEditor]軟體
使用[http://www.emeditor.com/ EmEditor]軟體
# Menu: Search -> Replace
# Menu: Search -> Replace
Line 18: Line 18:
# click "Replace all"
# click "Replace all"


== 方案2: Notepad++ ==
=== 方案2: Notepad++ ===
使用[http://notepad-plus-plus.org/ Notepad++]軟體
使用[http://notepad-plus-plus.org/ Notepad++]軟體
# 選單: 尋找 -> 取代
# 選單: 尋找 -> 取代
Line 26: Line 26:
# 勾選全部取代
# 勾選全部取代


----
相關資料: [http://sourceforge.net/apps/mediawiki/notepad-plus/index.php?title=Replacing_Newlines How To Replace Line Ends, thus changing the line layout] last visited: 2010-01-27
相關資料
* [http://sourceforge.net/apps/mediawiki/notepad-plus/index.php?title=Replacing_Newlines How To Replace Line Ends, thus changing the line layout] last visited: 2010-01-27


== 方案3 ==
=== 方案3: Microsoft Word ===
使用Microsoft Word 2002軟體
使用Microsoft Word 2002軟體
# 選單: 編輯 -> 取代
# 選單: 編輯 -> 取代
Line 37: Line 35:
## 取代為: ,
## 取代為: ,
# 勾選全部取代
# 勾選全部取代
== IP ==
使用[http://notepad-plus-plus.org/ Notepad++]軟體
# 選單: 尋找 -> 取代
# 搜尋模式: 勾選「用類型表式」
## 尋找目標: \d\d?\d?\.\d\d?\d?\.\d\d?\d?\.\d\d?\d?


[[Category:RegExp]] [[Category:Software]]
[[Category:RegExp]] [[Category:Software]]

Revision as of 14:18, 4 November 2011

將Email清單,轉成Email軟體可以使用的寄信名單 (取代換行符號)

[email protected]
[email protected]
[email protected]

改成
[email protected], [email protected], [email protected]

方案1: EmEditor

使用EmEditor軟體

  1. Menu: Search -> Replace
  2. click "Use Regular Expression"
    1. Find: \n
    2. Replace with: ,
  3. click "Replace all"

方案2: Notepad++

使用Notepad++軟體

  1. 選單: 尋找 -> 取代
  2. 搜尋模式: 勾選「增強模式」 (不是勾選「用類型表式」)
    1. 尋找目標: \r\n
    2. 取代成: ,
  3. 勾選全部取代

相關資料: How To Replace Line Ends, thus changing the line layout last visited: 2010-01-27

方案3: Microsoft Word

使用Microsoft Word 2002軟體

  1. 選單: 編輯 -> 取代
  2. 勾選增強模式
    1. 尋找目標: ^p (段落標記)
    2. 取代為: ,
  3. 勾選全部取代


IP

使用Notepad++軟體

  1. 選單: 尋找 -> 取代
  2. 搜尋模式: 勾選「用類型表式」
    1. 尋找目標: \d\d?\d?\.\d\d?\d?\.\d\d?\d?\.\d\d?\d?