3 ms·
Glob (333) without cheating (replace ⁕s with asterisks, they get turned into italics): ^(\⁕?)(\w⁕)(\⁕?)(\w⁕)(\⁕?)(\w⁕) .⁕ ((.(?!\1))+|\1)\2((.(?!\3))+|\3)\4((.
by hadrel 13y ago
Glob (333) without cheating (replace ⁕s with asterisks, they get turned into italics):
^(\⁕?)(\w⁕)(\⁕?)(\w⁕)(\⁕?)(\w⁕) .⁕ ((.(?!\1))+|\1)\2((.(?!\3))+|\3)\4((.(?!\5))+|\5)\6$
Edit:
((.(?!\1))+|\1) is used to conditionally match .+ iff a * has been found.
.(?!\1) Matches any character if it is followed by \1. When * has been found then it matches no character, when * is not found it matches every character.
Edit 2:
Formatting to avoid the *s becoming italics :/
- josephlord 13y agole[^*]|co|ito|dr|^p|su|gi|nr|hw|fa|[eo]b|ide Glob 376 although it isn't pretty and better may be possible. Indent two spaces with a blank line above to avoid code mangling.
- deleted 13y ago[deleted]
- falsedan 13y agoGlob 380 ^([wlpb]|c[hor]|do|re|mi|\*[pifvt]|\*er)
- GregP91 13y agoen(?!c)|rr|il|eat|^(do|p|b|c(?!a)) Glob 386 although not the cutest way to do it.