Re: [Tutor] (no subject)

2019-03-22 Thread Cameron Simpson
On 22Mar2019 17:45, Matthew Herzog wrote: I have a Python3 script that reads the first eight characters of every filename in a directory in order to determine whether the file was created before or after 180 days ago based on each file's name. The file names all begin with MMDD or

Re: [Tutor] (no subject)

2019-03-22 Thread Alan Gauld via Tutor
On 22/03/19 21:45, Matthew Herzog wrote: I need to tell my script to ignore any filename that does not conform to the standard eight leading numerical characters, example: 20180922 or erased_20171207_1oIkZf.so. Normally we try to dissuade people from using regex when string methods will do

[Tutor] (no subject)

2019-03-22 Thread Matthew Herzog
I have a Python3 script that reads the first eight characters of every filename in a directory in order to determine whether the file was created before or after 180 days ago based on each file's name. The file names all begin with MMDD or erased_MMDD_etc.xls. I can collect all these

Re: [Tutor] My problem in simple terms

2019-03-22 Thread Mats Wichmann
On 3/21/19 11:54 PM, Edward Kanja wrote: > Greetings, > I'm referring to my question i sent earlier, kindly if you have a hint on > how i can solve > my problem i will really appreciate. After running regular expressions > using python > my output has lot of square brackets i.e.

Re: [Tutor] My problem in simple terms

2019-03-22 Thread Edward Kanja
Greetings, I'm referring to my question i sent earlier, kindly if you have a hint on how i can solve my problem i will really appreciate. After running regular expressions using python my output has lot of square brackets i.e. [][][][][][][][][]. How do i substitute this with empty string so as to