in reply to Two-dimensional match/regex?
/s
Update: So, I actually tried this, and found you probably don't want to go this way:
is intended to matchmy $pat = qr{^ (?{$pre0 = pos}) (.*) (?{$x = pos() - $pre0; $pre = qr/.{$x}/; print STDERR "$pre\n +"}) aa (?{$post0 = pos}) (.*) (?{$x =pos() - $post0; $post = qr/.{$x}/; print STDERR "$post +\n"}) $ ^(??{ $pre }) bb (??{ $post }) $ ^(??{ $pre }) cc (??{ $post }) $ }xm;
aa bb ccbut in fact yields:
perl% perl -w 2dpm.pl
(?-xism:.{8})
zsh: 4283 segmentation fault (core dumped)
perl% perl -v
This is perl, v5.6.1 built for ppc-linux-thread-multi
Not sure if this is my fault or not.
|
|---|