Fix regex for autocomplete generation (fixes #72)