Re: preg_match

From: Date: Fri, 19 Aug 2005 13:35:20 +0000
Subject: Re: preg_match
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-220948@lists.php.net to get a copy of this message
Jon wrote:
preg_match_all("/Charges \s\s+ $total x (.+) /siU", $single, $from_invoice);
You'll probably need to assemble that expression first. The regex may be seeing the dollar sign for your variable as an end of line delimiter. $match = "/Charges\s{1,}" . $total . "\sx\s(.*)\s/siU"; preg_match_all ( $match, $single, $from_invoice ); -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 john@kegworks.com

« previous php.general (#220948) next »