Regular expressions

Tim Chase python.list at tim.thechases.com
Mon Nov 2 21:42:37 EST 2015


On 2015年11月02日 20:09, Seymore4Head wrote:
> How do I make a regular expression that returns true if the end of
> the line is an asterisk

Why use a regular expression?
 if line[-1] == '*':
 yep(line)
 else:
 nope(line)
-tkc


More information about the Python-list mailing list

AltStyle によって変換されたページ (->オリジナル) /