in reply to Regex returns match the first time. It returns everything thereafter

What do you think
/line/../\\Z/
does?

What it actually parses out as is this:

perl -MO=Deparse -e'$line =~ /line/../\\Z/' $line =~ /line/ .. /\\Z/;
That means it's a flip-flip (perlop for more info on that), which means it stays true after the first regex matches until the 2nd matches (which it probably never does).

What were you trying to do?


Mike

Replies are listed 'Best First'.
Re^2: Regex returns match the first time. It returns everything thereafter
by guitarplayer68 (Novice) on Nov 15, 2013 at 20:45 UTC

    Hi Mike,
    What I think the regex does is this. It matches from 'line' to the end of the string. As for what I was trying to accomplish. I'm trying to grab the contents of a file which lives across several servers but only return the lines in the file which occure after the line, "customizations must be after this line." I'll read up on perlop this weekend and see what i can learn.
    Thank you for your reply.