Regular expressions to the rescue! Will try soon, stay tuned.