Thank God there was no way even a cheat sheet could have helped me, so I used ChatGPT to think for me. I just asked what I wanted to be selected, and it was done!

Thank God there was no way even a cheat sheet could have helped me, so I used ChatGPT to think for me. I just asked what I wanted to be selected, and it was done!
Erm... It looks like this just matches from the "first double-dash followed by a non-whitespace character" to the end of the string. So equivalent to the somewhat simpler
--\S.*/gs
...or, in KM:
(?s)--\S.*
What am I missing?
You are not missing anything. It is good.
Hmmm..! If you would like to learn more about regular expressions, Regular Expressions 101 is one of the most useful Web sites. I do understand though how ChatGPT was useful in giving you a start there!
Surely nothing; you can come up with the answer even when the question is not apparent!
I was thinking maybe a regex flavour that didn't have the option for .
to match newlines or something. Or some funky character -- control or weird Unicode combo -- that wasn't covered by the union of those two character sets.
It seemed a strange answer to what is a well-solved, and thus frequently scraped from the web during training, problem.
I've adjusted the title to make the thread more easily found ( and more useful to ) later searches.
I wonder whether using an LLM does really "assist in thinking" ?
Perhaps they just bypass experimentation and learning, leaving you with things which may or may not (more or less) seem to work, half the time, but are poorly understood ?
I just asked ... and it was done!
Not quite. It was found (or the parts were found and restitched in combinations that looked statistically plausible).
Presenting the results in plausible sentences can give an impression of thinking (much oversold to LLM investors until the recent market upset) but what is actually happening is approximate retrieval of existing intellectual property.
See, for example: Can LLMs Really Reason and Plan? – Communications of the ACM
FWIW – one of many ways, in Keyboard Maestro, of harvesting only lines which begin with "-- ":