Menu

not follow link with certaintext

Help
2012-04-16
2013-04-09
  • Nobody/Anonymous

    I have $crawler->addNonFollowMatch("/.(jpg|gif|png|css|ico|com|js|jspa|swf)$/ i"); which works great.
    How would I also add pages with 'print-view' into that regex?

    this is great - thanks!

     
  • Nobody/Anonymous

    this seems to work - jusy add another grouped or
    $crawler->addNonFollowMatch("/(?:jpg|gif|png|css|ico|com|js|jspa|swf)| (print-view) / i")

     
  • Nobody/Anonymous

    Hi,

    you also may call addNonFollowMatch more than one time,
    so this shpould also work:

    $crawler->addNonFollowMatch("/.(jpg|gif|png|css|ico|com|js|jspa|swf)$/ i");
    $crawler->addNonFollowMatch("/print-view/ i");
    

    Maybe a little more "straight".

     
  • Nobody/Anonymous

    Thanks

     

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.