Answer the question
In order to leave comments, you need to log in
How can I fix the regular expression so that it correctly searches for a link in the text that comes after this link?
Hello friends, please help me to complete the regular expression.
The task is this:
Given a page www.region.ru/raskrytie-informatsii/region-develop...
My task is to parse the URI of a link to a file from the "Calculation of the size of own funds" tab, knowing the date of the file's publication.
I wrote a regular expression, but it does not select the link closest to the publication date, but the first link in the tab.
Regular: "#class="rasschetSredstv".*<td>.*href="(?P<URL>.*)".*(?P<DATE>15.03.\d\d\d\d).* </td>#Ums"
Below is a screenshot of the $matches array
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question