Richard, Adam, Barry, Dave, David,
Thank you all for your helpful advice regarding expressions.
I was able to combine all your advice, and made some additional
discoveries along the way.
The winning expression is:
"#^(.*)\s#iU"
First, I discovered that sometimes the source text had an unexpe
On Tue, August 8, 2006 4:21 am, Dave M G wrote:
> 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 encl
On 08/08/06, Dave M G <[EMAIL PROTECTED]> 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:
. stands fo
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, "#
4 matches
Mail list logo