I am trying to use WWW :: Mechanize to extract some links from an HTML page using a method find_all_links(). It supports matching by these criteria:
find_all_links()
How can I extract all links except that have the text "xyz"?
You can use criteria 'text_regex':
'text_regex'
$mech->find_all_links(text_regex => qr/^(?!xyz$).*$/);
See perldoc perlre for more information on negative expectation.
, "grep", , ?
Source: https://habr.com/ru/post/1738652/More articles:Functional way to get matrix from text - arraysнайти уникальные матрицы из более крупной матрицы - scalaизменить размер письма на teXnicCenter & MikTex - latexShould I use a registry or a flat file to save the state of the program? - language-agnosticA regular expression that includes an exception (that is, "Does not contain") for grep - regexiphone - using UISwitch - iphonemercurial fails with a file named ---. config - in any way? - mercurialjQuery Toggle with Cookie - jqueryThe static and dynamic parent function - c ++OpenStreetMap and Hadoop - postgresqlAll Articles