Re: [PHP] Need help with regular expression

2008-07-10 Thread Maxim Antonov
Hello. But I need no td and tr inside regular expression It is a part of my templater. In real code it looks like: if(strlen($item[$key])1){ return preg_replace('#\{%%%.*?\{%'.$key.'%\}.*?%%%\}#is','',$tpl); } if one of $key inside {%%% %%%} points to

RE: [PHP] Need help with regular expression

2008-07-10 Thread Boyd, Todd M.
-Original Message- From: Maxim Antonov [mailto:[EMAIL PROTECTED] Sent: Thursday, July 10, 2008 4:24 AM To: php-general@lists.php.net; Daniel Brown Subject: Re: [PHP] Need help with regular expression Hello. But I need no td and tr inside regular expression It is a part of my

Re: [PHP] Need help with regular expression

2008-07-10 Thread Al
Your description of the problem is confusing. Do you simply want to delete a table row if it contains a variable, e.g., $var='bigfoto' and append ==REPLACEMENT== ? Where $var can be anything you assign. Maxim Antonov wrote: Hello. But I need no td and tr inside regular expression It is a

Re: [PHP] Need help with regular expression

2008-07-10 Thread Eric Butera
On Wed, Jul 9, 2008 at 5:21 AM, Maxim Antonov [EMAIL PROTECTED] wrote: Hi, all! I try to use folowing regular expression: $out = preg_replace('#\{%%%.*?\{%bigfoto%\}.*?%%%\}#is','==REPLACEMENT==',$str); It not work as I need. Please tell me - what I do wrong? I have string:

Re: [PHP] Need help with regular expression

2008-07-09 Thread Daniel Brown
On Wed, Jul 9, 2008 at 5:21 AM, Maxim Antonov [EMAIL PROTECTED] wrote: Hi, all! I try to use folowing regular expression: $out = preg_replace('#\{%%%.*?\{%bigfoto%\}.*?%%%\}#is','==REPLACEMENT==',$str); [snip!] I need result as: trtdNAME:/tdtdinput type=text name=name value=