Menu

Regex Used for Follow Rules

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

    I'm looking at adding a regex to make sure that only url's that contain the word Listing are included.  I've been slightly confused by the # signs in the regex examples.  Are these required around the regex pattern?

     
  • Uwe Hunfeld

    Uwe Hunfeld - 2012-08-17

    Hi!

    Yes, the "delimiters" are required (as in every regular expression).

    So $crawler->addURLFollowRule("#listing# i") should do the trick.

    Best regards!

     

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.