in reply to vertical regex in a matrix?
The first part to match the horizontal parts works fine. The second part to match the verticals doens't work though for two reasongmy $string = <<EOF; xxxYYxxxYYxxx YY YY 4Y 4X 4Y 4Y YY YY EOF print "1: $string"; $string =~ s/ (?: (?<=x) | \G ) (Y) (?= Y* x) /x/gx; print "2: $string"; $string =~ s/ (?<= ^ (.*) Y .* $ ^ \1 ) (4) (?= .* $ ^ \1 Y .* $ ) /Y/mgx; print "3: $string";
|
|---|