Re: Regular Expressions
| From: | Matt M. | Date: | Thu, 15 Jul 2004 13:02:13 +0000 |
| Subject: | Re: Regular Expressions | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-190585@lists.php.net to get a copy of this message | ||
> Obviously the new-line is missed. Any thoughts on this?
>
> sample code:
> ereg("Last Name:\s*(.*)\n", $strInput, $regs)
> echo $regs[1];
try this:
ereg("Last Name:\s*(.*[^\n])", $strInput, $regs);
echo $regs[1];