There's one area I'm finding AI is actually helpful for - regular expressions!!!
Regex is something which can save hours of manual editing but is so fugly, I pretty much rely on google to find useful bits.
Imagine my surprise when google (not gemini, just regular google) started answering my regex questions like a champ!
For example,
Is Google up to the challenge? It answers!
And I'll be damned, it works! No way I'd have the patience to figure that one out.
Then it answered my follow-up question,
and google answers
and that worked too, a single operation that accomplished in 1 second what would have taken me HOURS of manual editing of this 14,000+ lines 600k file. And that was just one example, it helped with 20 other such conundrums.
Oh and did I mention that it also breaks down the regex and explains what each piece does?
So if I want to stop being a whiny little girl and maybe learn to do this myself, there's that.
I don't know what AI means for job security or humanity's continued survival, but for stuff like this - tedious shit that you don't want to do - it's pure gold!
PS the problem comes when it gets used to do stuff that you DO want to do!
Regex is something which can save hours of manual editing but is so fugly, I pretty much rely on google to find useful bits.
Imagine my surprise when google (not gemini, just regular google) started answering my regex questions like a champ!
For example,
- What regex to find all ": {value}" where {value} is not inside single or double quotes?
Is Google up to the challenge? It answers!
Code: (Select All)
: (?![ "'])((?:^"'\r\n:]|:(?! |$))+)(?![ "'])And I'll be damned, it works! No way I'd have the patience to figure that one out.
Then it answered my follow-up question,
- What regex to use in Notepad++ to find (above regex) and replace to add single quotes after the : and at the end of the line?
and google answers
Code: (Select All)
Find:
: (?![ "'])((?:^"'\r\n:]|:(?! |$))+)(?![ "'])$
Replace with:
: '\1'and that worked too, a single operation that accomplished in 1 second what would have taken me HOURS of manual editing of this 14,000+ lines 600k file. And that was just one example, it helped with 20 other such conundrums.
Oh and did I mention that it also breaks down the regex and explains what each piece does?
So if I want to stop being a whiny little girl and maybe learn to do this myself, there's that.
I don't know what AI means for job security or humanity's continued survival, but for stuff like this - tedious shit that you don't want to do - it's pure gold!
PS the problem comes when it gets used to do stuff that you DO want to do!

