Peter Kleiweg wrote: > R = re.compile('[=+*:()]|[a-z]+|[A-Z]+[0-9]+|[0-9]*\.[0-9]+|[0-9]+|[^ \t\r\n]) Lets also mention the title of the chapter under which a newbie can get more info on such solutions: Regexes: Bad Idea or Big Mistake? Istvan.