Re: [PHP] Re: I suck at regular expressions!

2001-11-15 Thread Richard S. Crawford
Actually, that does work when I'm using a string with that content. The only thing I can figure is that there is a problem with the way the the file is being read. Hmm. Ah, well. I'll make it work. Where's my hammer? At 12:18 AM 11/15/2001, Johan Holst Nielsen wrote: >Richard S. Crawford

[PHP] Re: I suck at regular expressions!

2001-11-15 Thread _lallous
try that! New Document '; if (preg_match('/(.+?)<\/title>/is', $mem, $matches)) { echo "title is:$matches[1]"; } ?> "Richard S. Crawford" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I am trying to get the title of an html file... you know, t

Re: [PHP] Re: I suck at regular expressions!

2001-11-15 Thread Johan Holst Nielsen
Richard S. Crawford wrote: > Not quite. I have the same problem. I tried at test on my localhost. Following works for me: $string = "Sometime i dont wanna know"; if(eregi("(.+)", $string, $arr)) { echo "Title: ".$arr[1]; } else { echo "unknown title"; } This works for me? Regards, Jo

Re: [PHP] Re: I suck at regular expressions!

2001-11-15 Thread Richard S. Crawford
Not quite. I have the same problem. At 11:36 PM 11/14/2001, Johan Holst Nielsen wrote: >Richard S. Crawford wrote: > > > I am trying to get the title of an html file... you know, the string > > between the < title > and < /title > tags... > > > > Here is the function I've got so far: > > > > fun

[PHP] Re: I suck at regular expressions!

2001-11-14 Thread Johan Holst Nielsen
Richard S. Crawford wrote: > I am trying to get the title of an html file... you know, the string > between the < title > and < /title > tags... > > Here is the function I've got so far: > > function fileTitle($fileName) { > $myFile = fopen($fileName, "r"); > $myText=""; >