Re: preg_match

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxx

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux