regex category archive


18 March 2009

Python script for backing up Twitter statuses

I was looking for a way to backup my tweets (I find that I'm reluctantly giving over to calling Twitter posts by that name, but I don't feel good about it) and found this "recipe" at ActiveState's web site:
Recipe 576594: Backup/download your tweets or anyone's tweets.
It's a nice simple Python script that saves messages to [...]

1 April 2008

Regex Walk-Through: Match filename base and extension

This post is a rather lengthy analysis of a short regular expression:
(.+?)(\.[^.]*$|$)
I'm continuing to enjoy and learn a lot from Jeffrey Friedl's Mastering Regular Expressions. One of the things that works well for me is the way he walks through examples and iteratively builds a more robust pattern for a particular task. It helps to [...]

29 March 2008

Python: Regex Test Function

 
More fun with Python and regular expressions. Following up on a previous post, I wanted to share a little test regex function I wrote in Python to help me as I work through the regular expression book.
I'm mostly working at the interactive prompt and had been running commands from Python re (the regex module) [...]

23 March 2008

Goals: Learning Python and Regular Expressions

I don't want to go all 7 Habits of Highly Effective People on you, but I'll say this: I think it's good to have goals and to work towards your goals.
I like this quote, which I've seen attributed to Zig Ziglar:
"Most people fail to reach their goals not because their plans are too simple or [...]