3 ms·
Is there a pattern language that would allow for the search in question being done in a single pattern instead of glueing two patterns together with an OR-opera
by wodenokoto 5y ago
Is there a pattern language that would allow for the search in question being done in a single pattern instead of glueing two patterns together with an OR-operator?
- tyingq 5y agoI don't see an or operator in the post anywhere, so I'm confused about which search you mean.
- SAI_Peregrinus 5y agoThey used two separate searches for where the T was. Didn't bother with an OR in code, just listed the results manually.
- wodenokoto 5y ago(l[iouy][^taer]t[^aers])|(l[iouy][^taer][^aers]t) Is in effect what the author is doing in regex (and how it is explained).
- TillE 5y agoIt would be fairly straightforward to write a Wordle DSL if you wanted to, which would be much faster than any generic pattern matcher. That's the risk of an overly complicated language, you can easily wind up slower than a series of regex filters.