Hey all,
Just wanted to share my great success using generative AI (ChatGPT in this case) to conquer a thorny foe: regular expressions. I wanted to pull three-letter station names out of a string like “DRIFT_ANH_2019_01_25” using stringR and couldn’t come up with a regex pattern using my limited knowledge of the subject.
Enter our new AI overlords. Soon my timid query of “write a regular expression to return the characters after the string ‘DRIFT_’ and before ‘_’” was turned into (?<=DRIFT_)[^_]+ faster than you can say “gee I hope we all still have jobs in 5 years.”
Hope this helps!
- Ted
---
Ted Flynn, PhD
Senior Environmental Scientist (Supervisor)
theodor...@water.ca.gov
Division of Integrated Science & Engineering
California Department of Water Resources
Call/text @ (916) 820-5052

saveourwater.com
--
https://interagencyecologicalprogram.github.io/DataScience/
---
You received this message because you are subscribed to the Google Groups "Bay-Delta Data Science Project Work Team" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bay-delta-datasc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bay-delta-datascience/SJ0PR09MB68466779150DB9B917FD47B0A4779%40SJ0PR09MB6846.namprd09.prod.outlook.com.
RE conversations with ChatGPT: I have been fighting with a formatting problem when exporting from bookdown:rs4_book to html ,, and asking Chat for feedback in so many different ways; nothing was correct.. I have *finally* just figured out what the problem was… And now I wonder… do I go back and inform Chat of the solution?
(I am not going to.. I think we need some time apart)
😉ka
From: bay-delta-...@googlegroups.com <bay-delta-...@googlegroups.com>
On Behalf Of Kyle Hardage
Sent: Wednesday, May 10, 2023 3:44 PM
To: Flynn, Ted@DWR <Theodor...@water.ca.gov>
Cc: Bay-Delta Data Science Fun <bay-delta-...@googlegroups.com>
Subject: Re: [bay-delta-datascience] [PSA] generative AI: a cure for your regex woes?
WARNING: This message is from an external source. Verify the sender and exercise caution when clicking links or opening attachments.
To view this discussion on the web visit https://groups.google.com/d/msgid/bay-delta-datascience/CAKibGkqJA1gWdOYGQjjq1C6RD4tYFoP_RjG3VbDhqGu3m-%2BwGA%40mail.gmail.com.