Re: regular expression
| From: | Brian Clark | Date: | Fri, 05 Jan 2001 21:37:20 +0000 |
| Subject: | Re: regular expression | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-32948@lists.php.net to get a copy of this message | ||
Hello Peter,
(PV == "Peter Van Dijck") peter@vardus.com writes:
PVD> 0 or more of anything as long as there is on " or ' in there
PVD> or even better
PVD> 0 or more of anything as long as there is no even amount of " or ' in there
PVD> Help! it's y first day at regular expressions, it's hard. I had this
PVD> [^\'\"]*
PVD> but it doesn't do it...
PVD> Peter
<?php
$string = "My Momma told me, you'd better shop around.";
if(ereg("([\'\"])", $string, $found))
{
print "I found $found[1]";
}
?>
-Brian