N
N
nibbl2016-04-29 17:49:25
PHP
nibbl, 2016-04-29 17:49:25

How to extract url from html with a specific mask?

Good evening everyone and Happy Holidays!
Help me solve one problem please.
The essence of the problem is this!
There is a site where there is a very large number of links, but they go as text and I need to pull out all these links from this page using a certain mask (for example, I would only copy links like this www.site.ru/parametr¶metr=1111) (i.e. that it would be possible to set the beginning, say http;// and the end only the numbers http://**********1111 , and they would not copy the rest.
Tell me through which programs or scripts can this be implemented?
I will be very grateful to everyone for the help !!!

Answer the question

In order to leave comments, you need to log in

4 answer(s)
D
DarkMatter, 2016-04-29
@darkmatter

So you can: regexr.com/3db1u (follow the link to the regex you need)

M
Maxim Timofeev, 2016-04-29
@webinar

There is a wonderful software for parsing - ContentDownloader sbfactory.ru/?p=600
There is also a wonderful php library simplehtmldom.sourceforge.net
And there is also a harsh but working thing - regular expressions

T
ThunderCat, 2016-04-29
@ThunderCat

regex , preg_match_all

A
abcd0x00, 2016-04-30
@abcd0x00

You need to select all the links, and then select those that satisfy the criterion from them. That's right, in parts, because just as the source of links can change regardless of the criterion, so the selection criterion can change regardless of the source.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question