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

Popular posts from this blog

javascript - Chart.js (Radar Chart) different scaleLineColor for each scaleLine -

apache - Error with PHP mail(): Multiple or malformed newlines found in additional_header -

java - Android – MapFragment overlay button shadow, just like MyLocation button -