in reply to Re: Re: Re: Need RegEx assistance
in thread Need RegEx assistance

This is the code compliments of jsprat
#!C:\Perl\bin\perl -w use strict; #paragraph mode - see perlvar, input record separator $/ = ""; while(<DATA>) { my @lines = split /\n/, $_; my $file; $lines[0] =~ s/\[/\[$file / if ($file) = $lines[1] =~ /([^/]*)$'; print join ("\n", @lines), "\n\n"; } __DATA__ [get4] $uri=/LRA/RiskApplicationPage.aspx $method=GET [get5] $uri=/LRA/CSS/RiskManagement.css $method=GET
I receive the following error:
Unmatched [ before HERE mark in regex m/([ << HERE ^/ at C:\Perl\greg2 +.pl line 10.