Often when I look through the PHP manual for certian functions, I see things like this:
PHP Code:
<?php // get host name from URL preg_match('@^(?:http://)?([^/]+)@i', "http://www.php.net/index.html", $matches); $host = $matches[1];
// get last two segments of host name preg_match('/[^.]+\.[^.]+$/', $host, $matches); echo "domain name is: {$matches[0]}\n"; ?>
I know what it does, and have used it, but one thing I dont understand is this: /[^.]+\.[^.]+$/ or @^(?: http://)?([^/]+)@i (from the example above. ONly part I really understand of those is that the i means case insensitive.
Iv looked through the manual but cant seem to find anything
|