A584537 Posted September 28, 2006 Share Posted September 28, 2006 Hi, I'm using a C program to get a html page from a site, because I don't know how to use PHP sockets yet.And, I'm using PHP to strip the tags and change to a space and such.What I need though, is to only get capitalised words. Here's an example:[code]CLERKS IISequel to Clerks. A calamity at Dante and Randall's shops sends them looking for new horizons...CLICKMichael Newman’s life is transformed when he is given a universal remote to control his life.DIRTY SANCHEZAn extreme version of Jackass.[/code]I only want the movie titles, and luckily they are all capitalised.I want to get the capitalised words out of a string, $contents2.How would I go about this? Cheers Link to comment https://forums.phpfreaks.com/topic/22376-getting-only-capital-words/ Share on other sites More sharing options...
HuggieBear Posted September 28, 2006 Share Posted September 28, 2006 I'd recommend a regular expression for this...Try posting in the Regular Expression forum on this board and in the mean time check out [url=http://uk.php.net/manual/en/ref.pcre.php]the manual[/url] on it.RegardsHuggie Link to comment https://forums.phpfreaks.com/topic/22376-getting-only-capital-words/#findComment-100242 Share on other sites More sharing options...
xyn Posted September 28, 2006 Share Posted September 28, 2006 To make text uppercase / lowercase like so...ash => ASHstrtoloupper($var);PAUL => paulstrtolower($var); Link to comment https://forums.phpfreaks.com/topic/22376-getting-only-capital-words/#findComment-100245 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.