ChatGPT to learn and create regex expressions

I’ve just tested ChatGPT to create a regex expression and it worked!

I asked ChatGPT: Whats the regex to match a string without the string hello?

And the answer was:

^(?!.*hello).*$

with a helpful explanation:

Screenshot of a regex expression in a text editor with a breakdown explanation. The expression is designed to match a string that does not contain the word 'hello'.

Always take the answers from ChatGPT with a grain of salt, because they can be plain wrong, but I believe this tool can be a real helper to create regular expressions or AutoHotkey macros.



Generated Image Alt-Text
[edited by: Trados AI at 10:12 AM (GMT 0) on 4 Mar 2024]
emoji