課程
/后端開(kāi)發(fā)
/Python
/python正則表達(dá)式
[]表示的字符集中字符的順序是按什么排列的?比如【0-9】、【a-z】, ASCii嗎? 謝謝
2018-08-26
源自:python正則表達(dá)式 3-1
正在回答
import rem1=re.match(r'[0-z]*','78erW90Er')m2=re.match(r'[0-Z]*','78erW90Er')print m1.group()print m2.group()
#結(jié)果
#78erW90Er
#78
#ASCII是從數(shù)字到大寫字母再到小寫字母的,確實(shí)符合ASCII碼表
慕神3407587 提問(wèn)者
舉報(bào)
如何使用正則處理文本,帶你對(duì)python正則有個(gè)全面了解
1 回答轉(zhuǎn)義字符!!
2 回答字符+的一個(gè)匹配問(wèn)題
1 回答字符串匹配問(wèn)題
1 回答匹配行結(jié)尾字符串
1 回答r原生字符串轉(zhuǎn)義
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號(hào)-11 京公網(wǎng)安備11010802030151號(hào)
購(gòu)課補(bǔ)貼聯(lián)系客服咨詢優(yōu)惠詳情
慕課網(wǎng)APP您的移動(dòng)學(xué)習(xí)伙伴
掃描二維碼關(guān)注慕課網(wǎng)微信公眾號(hào)
2018-09-15
import re
m1=re.match(r'[0-z]*','78erW90Er')
m2=re.match(r'[0-Z]*','78erW90Er')
print m1.group()
print m2.group()
#結(jié)果
#78erW90Er
#78
#ASCII是從數(shù)字到大寫字母再到小寫字母的,確實(shí)符合ASCII碼表