Thread: Regex examples
View Single Post
Old 04-09-2022, 08:18 AM   #715
patrik
Guru
patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.
 
Posts: 683
Karma: 4568205
Join Date: Jan 2010
Location: Sweden
Device: Kobo Forma
I want to catch some hrefs.

This catches all:

<a href=".*?">(.*?)</a>
\1

I want to only get those that have the word "smil" somewhere within the link.
href=" smil "

I have tried many ways, but I can't seem to understand regex good enough...
patrik is offline   Reply With Quote