Make metadata RE reluctant (stop on first = not last) #51

Merged
merged 1 commit into from Jun 18, 2012

Projects

None yet

2 participants

@lennax

Thanks to @dzerbino for many fixes. The metadata hash added here: d928de1#L2R170
fixed mis-parsing contigs with internal =, but a UnifiedGenotyper metadata line isn't wrapped in angle brackets and is thus still parsed improperly.

This is a very simple tweak to the RE:

(.+)=(.+) will put everything up to the very last = in the first group because + is greedy by default.

(.+?)=(.+) makes the + reluctant, so only the first group of characters that are not =, aka the key, will be in the first group.

@jamescasbon jamescasbon merged commit 9e075dd into jamescasbon:master Jun 18, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment