note 69246 added to function.preg-match
| From: | dave at kupesoft dot com | Date: | Mon, 28 Aug 2006 14:30:55 +0000 |
| Subject: | note 69246 added to function.preg-match | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-116436@lists.php.net to get a copy of this message | ||
Here's a way to run a regular expression and catch the match in one line
<?php
/* ... */
$match = preg_match('/^GET (.+) HTTP\/1\.1/U', $request, $match) ? $match[1] : false;
?>
~
----
Server IP: 216.235.15.211
Probable Submitter: 70.26.187.162
----
X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER
autolearn=no version=2.64
----
Manual Page -- http://www.php.net/manual/en/function.preg-match.php
Edit -- https://master.php.net/note/edit/69246
Del: integrated -- https://master.php.net/note/delete/69246/integrated
Del: useless -- https://master.php.net/note/delete/69246/useless
Del: bad code -- https://master.php.net/note/delete/69246/bad+code
Del: spam -- https://master.php.net/note/delete/69246/spam
Del: non-english -- https://master.php.net/note/delete/69246/non-english
Del: in docs -- https://master.php.net/note/delete/69246/in+docs
Del: other reasons-- https://master.php.net/note/delete/69246
Reject -- https://master.php.net/note/reject/69246
Search -- https://master.php.net/manage/user-notes.php