Thread: Regex examples
View Single Post
Old 04-09-2022, 04:10 AM   #712
Ashjuk
Fanatic
Ashjuk ought to be getting tired of karma fortunes by now.Ashjuk ought to be getting tired of karma fortunes by now.Ashjuk ought to be getting tired of karma fortunes by now.Ashjuk ought to be getting tired of karma fortunes by now.Ashjuk ought to be getting tired of karma fortunes by now.Ashjuk ought to be getting tired of karma fortunes by now.Ashjuk ought to be getting tired of karma fortunes by now.Ashjuk ought to be getting tired of karma fortunes by now.Ashjuk ought to be getting tired of karma fortunes by now.Ashjuk ought to be getting tired of karma fortunes by now.Ashjuk ought to be getting tired of karma fortunes by now.
 
Ashjuk's Avatar
 
Posts: 500
Karma: 3498633
Join Date: May 2011
Location: Surrey, UK
Device: Kobo Aura One, Sony PRS 600/650
This is why I find REGEX so confusing.

When I was searching various REGEX sites for the code I could not find a clear answer, and it appears from your replies there are numerous ways of achieving the same result.

Becky - "[A-Fa-f0-9-]+"
theducks - ".+?"
BillPearl - "([^>]+)(.*?)"
JSWolf - "(.*)"
and
DiapDealer - "[^"]+"

I only tried Becky's solution, which worked perfectly, but I assume all the above would have achieved the same result.

So I'm now even more confused. My poor septuagenarian brain is never going to cope

But thanks to everyone for their suggestions - I have noted them all for future reference.
Ashjuk is offline   Reply With Quote