[Tutor] Simple Regex

dn PyTutor at DancesWithMice.info
Thu Apr 8 16:25:44 EDT 2021


On 09/04/2021 05.43, Joao Carlos Silva de Oliveira Matos via Tutor wrote:
> Hello everyone,
> 
> I have to parse a regex for the first time. I have this path:
> *C:\Users\user\Downloads\4324234534254325\4324234534254325_213.csv.*
> 
> I want to retrieve the name of the folder between "Downloads\" and
> "\filename".
> 
> How do I do this?


Does pathlib, from the Python Standard Library help?
https://docs.python.org/3/library/pathlib.html?highlight=pathlib#module-pathlib
-- 
Regards,
=dn


More information about the Tutor mailing list