Hello choroba,
I don't like to give up without exhausting all avenues of research, and for me Perl is enjoyment and therapy (needed in this world we live in, and this age). This issue may now have dropped off the radars of the other participants, but not mine. jo37 came up with:
perl -le 'print for a .. h' | perl -nle 'if (my $ff = (/d/ .. /h/)) { +next unless $ff =~ /(?:^1|E0)$/; print }' d h
which troubles me because of that alternation and the absence of //, which I think is/was your point. Mine are, granted, after debugging with strategic print statements:
perl -le 'print for a .. z' | perl -nle 'if (/d/ .. /h/) { next unles +s // and $_ eq $&; print; }' d h
or
perl -le 'print for a .. z' | perl -nle 'if (/d/ .. /h/) { next unles +s $_ eq $& and //; print; }' d h
and is a short-circuit operator so it works either way. Does this do what you expected it to do?
Regards, Will
In reply to Re: Empty pattern in regex
by perlboy_emeritus
in thread Empty pattern in regex
by choroba
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |