Andy Pieters wrote:
Hi list
I still fail to understand why regular expressions are causing me such a hard
time.
snip /
Hi!
Why don't you use 'preg_match'? And why do you use all those character
classes?
This:
code
$subject = 'Nov 22 06:51:36';
$pattern =
Andy Pieters wrote:
Err.. why NOT use character classes? What is easier [0-9] or \d or maybe
[a-zA-Z] or [\w], ... ?
Well, first of all the square brackets in [\w] aren't needed, \w already
means 'any word character'.
Secondly, [a-zA-Z] is not the same as \w:
A word character is any
twistednetadmin wrote:
Thanks guys. That helps alot!
But this:
?php
print $_SERVER['HTTP_USER_AGENT'];
?
Returned this using Mozilla: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
rv:1.7.12) Gecko/20050915 Firefox/1.0.7
And this using IE: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT
3 matches
Mail list logo