There are times in which I hear about or start investigating something and suddenly I notice that I could use this knowledge, technology, pattern or term in various situations. Just recently I started diving into regular expressions. Even though I’m developing software for several years now I never took the time to really learn them.
Everything started with a small module that I developed for a project that I’m contributing to - the so called Open Decision Repository which I have been referring to in a few blog posts. I wanted to apply some of the neat URL rewriting techniques that Django or Spring use. Especially nice are Django’s capabilities with regard to reverting a regular expression, i.e. it can build a URL from a regular expression. For example you might define a RESTful URL for an entity Customer. From a view you could now say give me the URL to the Customer with id ten. Django now uses the regular expressions from your URL configuration to build the URL.
Besides the URL rewriting module I’m working for company which requested a better output format for ROBOdoc. This also required a fair amount of regular expressions and XML parsing using xmllib2 for Python but that’s a whole other story and subject to non-disclosure.
To document a small example I created the following Python program which replaces Twitter like links to users, e.g. @BenRipkens, with a link to the user’s profile.
That's me, Ben.
Hey, I am Ben Ripkens (bripkens)
and this is my blog.
I live in
Düsseldorf
(Germany)
and I am employed by the
codecentric AG as a Software Engineer.
Web application frontends are my main area of expertise, but you may also
find some other interesting articles on this blog.