python正則表達式總結

python進階知識點鞏固 一,正則表達式 使用正則表達式前引入re模塊 import re 使用正則舉例: import re text = ‘abcdesfgfsdf’ key = r’ab’ regex = re.compile(key) value = re.search(text,regex) print(value.group()) 1,re.compile函數 做用:用於生成一個pa
相關文章
相關標籤/搜索