Quote:
Originally Posted by schnesim
Have fun
(I had to add some spaces to prevent some parts being converted to smileys.)
|
If you wrap it in CODE tags, then it doesn't do the smiley substitutions.
Code:
date_time_re = r'([0-2]?[0-9]):([0-5][0-9])(?::([0-5][0-9])(?:\.([0-9]+))?)?\s*([AP]\.?M)?\s*(?:[A-Z]{3}?([+-][0-2]?[0-9](?::[0-5][0-9])?))?'
So, from the My Clippings files - German then Italian:
Code:
- Markierung Pos. 4921-27 | Hinzugefügt am Montag, 5. Mai 2014 6.49 Uhr GMT+01:01
- La tua evidenziazione alla posizione 750-750 | Aggiunto in data venerdě 4 settembre 2015 07:44:20
The regex matches the time OK for the Italian version, but it matches the timezone for the German version.
The month selection then fails for the Italian version as it the selection is looking for either a comma or semi-colon to separate the date from preamble on the line. The German version should work if the time was extracted properly.