replace
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.php archive

replace

From: <alexjaquet@gmail.com>
Date: Tue Apr 25 2006 - 17:35:50 CEST

Hi,

I'm looking for a way to replace some variables for example in perl I
do :

#replace all $LABEL variables with corresponding values from $SERVER
var
s/\$LABEL{'([\w]+)'}/ exists $SERVER{$1} ? $SERVER{$1} : $1 /eg;
#replace $LANG var with the value of $lang
s/\$LANG/$lang/g;
Received on Mon May 1 03:04:09 2006