What version of the Codex App are you using (From “About Codex” dialog)? Version 26.325.31654 (1272) What subscription do you have? Plus What platform is your computer? Darwin 24.6.0 arm64 arm What...
Nothing is wrong with that, but it will give you different output. I tend to like using capture groups just out of habit, it makes it more flexible and useful in future. Most of my co-workers hated Regex so I tried to make it easy for them.
I also wanted the letters to be as close together as possible. In this example it doesn’t matter, but in other texts it might. Yours will find the first y, then the furthest possible e, then the furthest possible s. So you might get output where there’s a y on line 1 and the e s at the very end of the text. Nothing wrong with that, it’s just not what I was envisioning.
Also it’s funnier in this context to have a complicated regex.
Tap for spoiler
It’s a Regex that checks if the letters for the word “yes” exists within a text in order. I call it the yesnometer
What’s wrong with
y.*e.*s?Nothing is wrong with that, but it will give you different output. I tend to like using capture groups just out of habit, it makes it more flexible and useful in future. Most of my co-workers hated Regex so I tried to make it easy for them.
I also wanted the letters to be as close together as possible. In this example it doesn’t matter, but in other texts it might. Yours will find the first y, then the furthest possible e, then the furthest possible s. So you might get output where there’s a y on line 1 and the e s at the very end of the text. Nothing wrong with that, it’s just not what I was envisioning.
Also it’s funnier in this context to have a complicated regex.