Tuesday, February 10, 2015

Pipelines and regular expressions

Cleaned up some code. Implemented a "pipeline" file that runs all the scripts in sequence.

Had a hell of a time getting regular expression to work for matching the times. The problem was using the "\1", "\2" shorthands for using match groups. Apparently it doesn't really work, at least in my set up (Windows 8.1, Powershell, Python 2.7.8). Finally got it by using the "\g<1>", "\g<2>".

Now, I'm having a hell of a time matching and substituting for the abbreviated days of the week, like "tues" to "tuesday". I'm able to match it using the "search" function, but for some reason I can't substitute it.

So frustrating.

No comments:

Post a Comment