JayBizzle / Crawler-Detect

🕷 CrawlerDetect is a PHP class for detecting bots/crawlers/spiders via the user agent
https://crawlerdetect.io
MIT License
1.96k stars 255 forks source link

Regex tweak #426

Closed JayBizzle closed 3 years ago

JayBizzle commented 3 years ago

@MaxGiting I'm not sure why this was part of the generic regex. Any thoughts. Tests pass without it 🤔

x-way commented 3 years ago

hm, looks like this was for the getMatches function, for the detection itself it does not make a difference.

eg. if you have a UA string of something something mysuperbot something something then in the old version getMatches would return mysuperbot and the new version would just return bot.

If the old behavior is still needed/wanted it probably would make sense to add a testcase for it 🙂

JayBizzle commented 3 years ago

@x-way thanks, that makes sense. I'll leave this open until i can get around to adding a testing case for this 👍