"Tiago Cunha" <tiagotmc at gmail.com> wrote >I would suggest to use the NLTK package. > > Try methods like nltk.endswith() or nltk.startswith() NLTK is probably overkill. The standard string methods startswith() and endswith() are probably adequate for this case. Alan G.