Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hello,
existing regex can not handle html title with css identificator, eg:
<title id="pageTitle">Facebook</title>
So, i'm suggest this regex as solution:
<title[^>]*>([^<]+)<\/title>
It is tested with online regex tools and also on my site.
Comments
Comment #2
chaitanya17 CreditAttribution: chaitanya17 at Cybage Software Pvt Ltd. for Cybage Software Pvt Ltd. commentedComment #3
Ivan Berezhnov CreditAttribution: Ivan Berezhnov as a volunteer and at Drupal Ukraine Community for Levi9 commented