Regular Expression
| From: | Chris Boget | Date: | Tue, 18 May 2004 16:54:40 +0000 |
| Subject: | Regular Expression | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-186492@lists.php.net to get a copy of this message | ||
Why isn't my regex working? From everything that I've
read, it should be...
<script language="php">
$string = "[joebob]";
if( preg_match( '/\[(\s+)\]/i', $string, $aMatches )) {
print_r( $aMatches );
} else {
echo 'No match was found' . "\n\n";
}
</script>
Chris