Re: regular expression : the dollar sign ($) work with re.match() or re.search() ?

iMath redstone-cold at 163.com
Mon Jan 7 04:45:58 EST 2013


在 2012年9月26日星期三UTC+8下午3时38分50秒,iMath写道:
> I only know  the dollar sign ($) will match a pattern from the
> 
> end of a string,but which method does it work with ,re.match() or re.search()  ?

I thought re.match('h.$', 'hbxihi') will match ‘hi’ ,but it does not .so why ?



More information about the Python-list mailing list