Capturing Yandex Bot entries from Apache Web log file

Q

How to capture the Yandex Bot from Web log file?

Here are some Web log file entries:

✍: Guest

A

Yandex Bot is a web crawler from Yandex that obtains content for the Yandex Search engine. Yandex Bot uses the following user agent string:

Mozilla/5.0 (compatible; YandexBot/3.0; +http://yandex.com/bots)/bots)

The regular expression to capture Yandex Bot entries from Apache Web log file can be written as: with the multiple lines modifier "m" specified:

Click the button to test this regular expression here online:

2013-02-04, 4765👍, 0💬