RegExp negative match not working

or I don't know how to make it work ...
Hello
im trying to build regexp that will match me single string or function call inside of brackets
for example I have :

<% myFunction("blah",foo) %>
or
<% myVar %>

and not match :
<% if(myFunction("blah",foo)==1) %>
or
<% while(myvar < 3){ %>

I tried to make it work with this regexp with no much lock :

<%\s* (\w+[^=<>]) \s %>
or
<%\s* (.*[^=<>]) \s %>

Hi Umen,

I did something similar sometime ago in perl here's the final code that takes my array and does the replace throughout the opened file:

foreach my $key (keys %enabled_yn) {
 $enabled_yn{$key} =~ chomp;
 $enabled_yn{$key} =~ s/Y/\<b\>\<font color=\"yellow\"\>Y\<\/font\>\<\/b\>/;
 $enabled_yn{$key} =~ s/ALL/\<b\>\<font color=\"yellow\"\>ALL\<\/font\>\<\/b\>/;
}


open (ZMIO, "/opt/apache/cgi-bin/html_templates/zmio.htp") or "Couldn't open file $!";
read (ZMIO,$html,-s "/opt/apache/cgi-bin/html_templates/zmio.htp") or "Couldn't open file $!";

      $html =~ s/%(\w+)%/$enabled_yn{$1}/g;

print $html;

The penultimate line starting $html is where the regexp is taking place.

HTH,

Cheers,
pondlife.

Hello and thanks for the fast reply , but can you please explain me what you did ?
Thanks