to get everything in between...
/>(.*?)<\/a>/;
print $1;
the first one doesn't get everything as you expect because the
[^\z] matches one non-EOL char so...
- .* gobbles everything to EOL
- the regex backtracks to match the > (last char on line)
- regex attempts to match a non-EOL char - FAIL - no chars left in string
- regex backtracks to match the previous >
- regex matches a non-EOL char "j" - COMPLETE
the second one just _looks_ for a non-EOL after the match but is zero-width so works as you expect.
hope this helps
larryk
perl -le "s,,reverse killer,e,y,rifle,lycra,,print"