Fix regex for retrieving flavor.

Previously a flavor like 'no_x11' would be truncated to 'no_x'.