30Apr/090
Thanks for a great term
Just wanted to thank my students, all ~44 of you, for putting up with my stammering explanations of genetics. I sure learned a ton and I hope you did too. Good luck with your finals.
30Apr/090
RegEx to id comma-space(s) or space(s) delimited text
I'm not all that great at RegEx, but I needed split a line of text on commas followed by spaces and/or by spaces (including tabs). 30 minutes later after swearing and sweating with iPython, I produced the following little expression. Who needs the CSV module?
re.compile(',(?:\s*)|\s*')
Example Usage:
line = 'one, two three four, five' pattern = re.compile(',(?:\s*)|\s*') line.pattern(split) >>> ['one', 'two', 'three', 'four', 'five']