[PHP] Re: Regular expression to find from start of string to first space

2006-08-08 Thread Adam Zey
Dave M G wrote: PHP, Shouldn't this regular expression select everything from the start of the string to the first space character: $firstWord = preg_match('#^*(.*) #iU', $word); It doesn't, so clearly I'm wrong, but here's why I thought it would: The enclosing has marks, "#", I *think* jus

[PHP] Re: Regular expression to find from start of string to first space

2006-08-08 Thread Barry
Dave M G schrieb: PHP, Shouldn't this regular expression select everything from the start of the string to the first space character: $firstWord = preg_match('#^*(.*) #iU', $word); It doesn't, so clearly I'm wrong, but here's why I thought it would: The enclosing has marks, "#", I *think* j