You are here: Re: How to remove specific function calls from source code... « PHP Programming Language « IT news, forums, messages
Re: How to remove specific function calls from source code...

Posted by Kimmo Laine on 09/07/06 11:43

<roman_tryk@gazeta.pl> wrote in message
news:1157624198.539861.83830@p79g2000cwp.googlegroups.com...
> Hi.
> I writing a lot of code that contains calls to my own Debug functions
> (like log).
> I want to produce a release from my code without this function calls,
> so I tried to write a program that reads a source code and removes this
> function calls with preg_replace...
> And here is a problem. I can't write a proper regexp for this use.
>
> There are some call that contains more that one argument or arguments
> are created dynamicaly, like:
>
> log($myVar1, $myVar2. " -> ". $myVar3, "(x:". $x .", y:". $y .")",
> $arg1.';('.$arg2.');'.$arg3);
>
> Can anyone help me with it? I'm not good in Regular Expresions so maybe
> I can learn something from this group ;)


Why not just change the debug function not to work?

--
"Ohjelmoija on organismi joka muuttaa kofeiinia koodiksi" - lpk
http://outolempi.net/ahdistus/ - Satunnaisesti pδivittyvδ nettisarjis
spam@outolempi.net || Gedoon-S @ IRCnet || rot13(xvzzb@bhgbyrzcv.arg)

 

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

Π‘Π°ΠΉΡ‚ ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ Π² Π‘Ρ‚ΡƒΠ΄ΠΈΠΈ Π’Π°Π»Π΅Π½Ρ‚ΠΈΠ½Π° ΠŸΠ΅Ρ‚Ρ€ΡƒΡ‡Π΅ΠΊΠ°
ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ΠΈΠ΅ ΠΈ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΊΠ° Π²Π΅Π±-сайтов, Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠ° ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ½ΠΎΠ³ΠΎ обСспСчСния, поисковая оптимизация