Regular expressions

Tim Chase python.list at tim.thechases.com
Tue Nov 3 06:53:39 EST 2015


On 2015-11-02 22:17, Seymore4Head wrote:
> On Mon, 2 Nov 2015 20:42:37 -0600, Tim Chase
> <python.list at tim.thechases.com> wrote:
> 
> >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?
> >
> Because that is the part of Python I am trying to learn at the
> moment. Thanks

Ah, well that's an entirely different problem-space, so then you
would want to use MRAB's answer

  r = re.compile(r"\*$")

-tkc






More information about the Python-list mailing list