s/regex/chatgpt/ #34
phips
started this conversation in
Show and tell
Replies: 1 comment 1 reply
-
Nice. I wonder if it could write a correct shell script to perform the same transformation? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I used to love writing regexs.
man perlre
is one's friend. However, these days I count myself as a 'retired engineer', and I'm either slow or, being candid, can't be bothered. I keep this super helpful blocklist in an nginx config (thanks to Robb Knight's blog for that), but when it's updated I just want to swap out the list.I thought for a second about doing a quick macro in Vim, then I thought I could, should, code something quick and dirty and maybe submit to the repo. Then I thought "I wonder if ChatGPT can sort this?"
So I tried:
Hey! Can you take this list and remove "User-agent:\s" then join every entry together with | ?
Sorted 😄
There’s a delicious irony in asking chatgpt to sort a blocklist of AI content scrapers for nginx, don’t you think?
Beta Was this translation helpful? Give feedback.
All reactions