D
D
Dp762020-06-25 22:19:15
Regular Expressions
Dp76, 2020-06-25 22:19:15

How to find all links on a page to a specific domain?

There is a task to cut out all external links to a domain, a static site.
That is, an example, I need to find links like

<a href="http://example.com">1rer</a>
<a href="http://example.com/fdfdsfds">fdsfsdfsd</a>
<a class="fff" href="http://example.com/dsdaas">3e2fdf fdsfds</a>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
re_quest, 2020-06-25
@re_quest

https://regex101.com/r/NcRP0R/1

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question