Regular Expressions 101

Community Patterns

Find image links

0

Regular Expression
Python

r"
<a[\S ]*href=\"([a-zA-Z0-9\/\.:]*)\"[\S ]*[\s]*><img[\S ]*src=\"([a-zA-Z0-9\/\.]*)\"[\S ]*[\s]*\/{0,1}><\/a>
"
gms

Description

Finds image links, for example, links to other's pages on personal webpages.

Submitted by anonymous - a year ago