[PHP] regex makes my head hurt

2003-03-04 Thread Kris Jones
I've been attempting to figure out regex, and I've realized I need to start over from scratch. And get lots of help! I'm inputting a text file containing html which will contain this: IBM 2:59pm 76.17 I need to be able to match this string via a variable. I would like to put everything from th

[PHP] Re: Checking for HTTP:// at the start of a string and more ////

2003-03-01 Thread Kris Jones
Untested: if (preg_match('/^http:\/\/[^\.\s]+\.[^\s]+\/$/i', $string)) // valid string else // invalid string Should match a string beginning with 'http://', followed by one or more characters that are no dots or whitespace, followed by a dot, followed >by one or more characters that are no