This blog may be idle but things happen. Funny thing when you're into stuff up to your neck is that you lose the taste for writing.
So this is not really news but really ok for a quick post.
I had to get into regular expressions because I needed a perl service that could open a page and grab a chunk knowing a tag name and id and replace it's innerHtml with some new content. Well perl was built for this kind of stuff so I went ahead without fears. And it delivered flawlessly.
The good thing with learning new stuff is that you never know when it'll come in handy.
Few months later I was shopping for a 2 or 3 rooms apt here in Cluj. Now here we have a printed paper and if you have time to read all the ads you'll do fine. They have a site too and you can perform pretty decent search actions. I didn't even have time for that. So I looked into their new and shiny RSS feeds. Bad thing they have one feed for the entire real estate section so that isn't really useful when you know what you're looking for. So I said to myself that I could grab that big xml page and regex should be able to handle all the tabled html chunk ads piled inside it and look for what I needed: "JonDoe|SomeAgency sell|sells a 2|3 rooms apt|apartment located in Cluj-Napoca". This translates into (Romanian words):
"/Cluj\s*-\s*Napoca/i",
"/(apt|apartament)/i",
"/(2|3)\s*cam/i",
"/(vand|vinde)/i"
LastRss came very handy in speeding up development.
Regex Coach is also invaluable for well ... regex stuff.
And as it was RSS to begin with I kept the flavor because I also use and LOVE
NetVibes: the
Cluj 2/3 rooms apartments RSS Feed (in realtime so you can be the first to call and buy them all [insert evil laugh here]). Add it to your favorite feed reader to gasp it's full power.
Must admit that this would only help the local readers of this blog but if it helps someone then it's not wasted time.