Regex Question

abez abez at abez.ca
Wed Jul 17 11:35:41 CDT 2002


I'm having problems making a regex which does this

finds all 

$varname
${varname}
but doesn't find
$varname{

        my @all = ($k =~ /(\$[a-zA-Z_0-9]+)/g);
        my @all2 = ($k =~ m#(\$\{[a-zA-Z_0-9]+\})#g);

I've tried ($k =~ /(\$[a-zA-Z_0-9]+)(?!\{)/g);
but that doesn't work..

Basically my goal is to take a perl script and replace all variable name
with randomized names so that the source code is an utter pain to deal
with but it still works. 

-- 
ABeZ------------ ------- ------ - ---------- -- ------------
http://www.indexdirect.com/abez/ Abram Hindle (abez at abez.ca)
---- ------- ----------- ----------- - - ------ --------ABeZ




More information about the Victoria-pm mailing list