You are here: Re: [PHP] preg_match « PHP « IT news, forums, messages
Re: [PHP] preg_match

Posted by John Nichel on 10/19/20 11:24

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация