Re: python3 mystery

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Tim,

Thanks much, that worked! The quality of the lecture I was listening to was poor. It would have been lots better were I able to see video but such is not the case.

On Tue, 15 Sep 2015, Tim Chase wrote:

Date: Tue, 15 Sep 2015 08:19:18
From: Tim Chase <blinux.list@xxxxxxxxxxxxx>
Reply-To: Linux for blind general discussion <blinux-list@xxxxxxxxxx>
To: blinux-list@xxxxxxxxxx
Subject: Re: python3 mystery

On September 15, 2015, Jude DaShiell wrote:
ages=re.findall(r'\d[1,3]',examplestring)

This should use curly-braces:

 {1,3}

instead of square braces, and this

names=re.findall(r'[A,Z][a,z]*',examplestring)

should use a dash for the range instead of commas:

 [A-Z][a-z]*

which you might want to tweak for names like "MacArthur" in which
case you'd want

 [A-Z][A-Za-z]*

Hope this helps,

-tim


_______________________________________________
Blinux-list mailing list
Blinux-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/blinux-list


--

_______________________________________________
Blinux-list mailing list
Blinux-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/blinux-list



[Index of Archives]     [Linux Speakup]     [Fedora]     [Linux Kernel]     [Yosemite News]     [Big List of Linux Books]