Thread: Regex examples
View Single Post
Old 03-17-2025, 10:49 AM   #770
BeckyEbook
Guru
BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.
 
BeckyEbook's Avatar
 
Posts: 873
Karma: 3501146
Join Date: Jan 2017
Location: Poland
Device: Various
You are right!
The excerpt with * is better in this case:
Code:
href="(.*?)" id="(.*?)"
because it will also match empty attributes:
Code:
href="" id=""
It all depends on the intention of the questioner.
BeckyEbook is offline   Reply With Quote