in reply to RegEx Help - Look Behind
First of all, in negative look behind, variable length is not allowed, which you have used (.*).
If i understood your question correctly, this will work.
my $string = qq{oCMenu.makeMenu('m40','','Files','','',100,20) oCMenu. +makeMenu('m41','m40','Periodic Reports','index.cfm?openaction=file_ar +chive.view&CONTENT_ID=BF764E84-ED11-EC57-40672E520082E823','',125,20) + oCMenu.makeMenu('m53','m40','Reference Documents','index.cfm?openact +ion=file_archive.view&CONTENT_ID=BF76E870-E7CC-515F-D4D5C3D4A210BB9A' +,'',125,20)}; my ($match) = $string =~ /Periodic Reports','([^']*)/; print "$match\n"; #$string =~ /Periodic Reports','(?<!.*'$)/; #not matches
Also take a look at perlre
Prasad
|
|---|