Created
December 2, 2022 02:11
-
-
Save Matojeje/6510169e7f4093ba644ddb0c33f093e8 to your computer and use it in GitHub Desktop.
the puppy regular expression
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const buppy = /^(?:[pb](?:[bwluh]*)?[uae]+p*|p(?:[bwluh]*)?[uae]+([pb])\1*|([pb])(?:b?[lwuh]*)?\2[uae]+|[pb]u+)(?:[yi]+?e?|e+h?)?[sz]?$/gm | |
for (pup of "puppy,buppy,bupy,pupy,pup,puy,up,uppy,ppuy,pbuy,bbuy,pabbi,puppeeh,bwappy,bluppy,baby,ppuies".split(",")) console.info(pup, !!pup.match(buppy)) | |
/* by MatoCookies :: 2nd of December 2022 */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment