dlce-eva / python-nexus

python-nexus - Generic nexus (.nex, .trees) reader/writer for python
BSD 2-Clause "Simplified" License
11 stars 3 forks source link

Fixed RE allowing for comments (as in Mesquite export) #6

Closed tresoldi closed 7 years ago

tresoldi commented 7 years ago

Hi Simon,

the regular expression you are using does not support comments after the type of the block, such as in Mesquite's export of trees:

BEGIN TREES[!'Parameters: Tree search criterion: minimize Tree value using character matrix'];

This pull corrects it. I also added an optional sequence of whitespaces before the semicolon in both the BEGIN and END label, as it seems to be acceptable by the de facto standard.