meta data for this page
  •  

差異處

這裏顯示兩個版本的差異處。

連向這個比對檢視

coding:python [2019/04/18 01:32] (目前版本)
ghsrobert 建立
行 1: 行 1:
 +====== Python ======
  
 +===== 要點 =====
 +  * 腳本裡若要放非 ASCII 字元,似乎需要處理 encoding 問題 FIXME
 +
 +==== 字串 ====
 +正規表達式的處理:(([[https://www.crifan.com/python_re_sub_detailed_introduction/|【整理】详解Python中re.sub – 在路上]]))
 +  * ''<B 字串> = re.sub("<正規表達式>", "<取代為>", <A 字串>)'':把 A 字串中符合正規表達式的部分取代掉,存入 B 字串
 +  * 記得要先 ''import re''