A rules based text parser