php - What is a good strategy for getting the title of a page? -
... server side , using php.
i read so article on when use regexes , states can use regexes parse html in cases.
<title></title>
should easy match.
i see no problem this. think popular answer voted not b.c. of correctness b.c. of entrainment value.
is o.k?
yes, is
/<title[^>]*>(.*?)<\/title>/is
different people have different opinions, though. , should use regex if know you're doing.
this might me interesting read: when should not use regular expressions?
Comments
Post a Comment