Regular expression: Difference between revisions
Jump to navigation
Jump to search
(→syntax) |
|||
| Line 54: | Line 54: | ||
== further reading == | == further reading == | ||
* [http://sourceforge.net/apps/mediawiki/notepad-plus/index.php?title=Regular_Expressions SourceForge.net: Regular Expressions - notepad-plus] | * [http://sourceforge.net/apps/mediawiki/notepad-plus/index.php?title=Searching_And_Replacing SourceForge.net: Searching And Replacing - notepad-plus], [http://sourceforge.net/apps/mediawiki/notepad-plus/index.php?title=Regular_Expressions SourceForge.net: Regular Expressions - notepad-plus] | ||
[[Category:RegExp]] [[Category:Software]] | [[Category:RegExp]] [[Category:Software]] | ||
Revision as of 20:54, 15 January 2012
case
將Email清單,轉成Email軟體可以使用的寄信名單 (取代換行符號)
原 [email protected] [email protected] [email protected] 改成 [email protected], [email protected], [email protected]
方案1: EmEditor
使用EmEditor軟體
- Menu: Search -> Replace
- click "Use Regular Expression"
- Find: \n
- Replace with: ,
- click "Replace all"
方案2: Notepad++
使用Notepad++軟體
- 選單: 尋找 -> 取代
- 搜尋模式: 勾選「增強模式」 (不是勾選「用類型表式」)
- 尋找目標: \r\n
- 取代成: ,
- 勾選全部取代
相關資料: How To Replace Line Ends, thus changing the line layout last visited: 2010-01-27
方案3: Microsoft Word
使用Microsoft Word 2002軟體
- 選單: 編輯 -> 取代
- 勾選增強模式
- 尋找目標: ^p (段落標記)
- 取代為: ,
- 勾選全部取代
Find IP address
使用Notepad++軟體 v.5.9.5
- 選單: 尋找 -> 取代
- 搜尋模式: 勾選「用類型表式」
- 尋找目標: \d\d?\d?\.\d\d?\d?\.\d\d?\d?\.\d\d?\d?
note: not support {n} syntax
參考資料: SourceForge.net: Notepad++: Regular expression for IP addresses
syntax
- 換行符號: \r\n (適用: Notepad++選項: 增強模式 & 用類型表式)
- tab鍵的固定空白分隔: \t (適用: Notepad++選項: 增強模式)
- 數字: \d (適用: Notepad++選項: 用類型表式)