Small cleanup
Fix prefix generation from regular expressions