Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Yep. But it gave straight up code rather than trying to persuade a natural language LLM to write code.

The regex I was expecting would be

    "\\b(dog.*)|(.*cat)\\b"
The key point is to ask the code model. Part of what ChatGPT does is it appears to categorize the question and then may dispatch it to the code model. If you know you have a code question, asking the code model first would likely be more productive and less expensive.


That's not a good regex. The cat part is harder than the dog part.

you regex will match the whole line up to cat.


I don't claim it was good - just what I was expecting from the prompt.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: