in reply to Re^2: Multi-line regex help needed
in thread Multi-line regex help needed

vxp,
Well then your real data and your posted data are not the same thing. What I provided you would have worked otherwise. Apparently all of your $ are actually not there in your real data.

At this point, I would use the flip flop operator or my own flag to tell me the start and end of a section. It doesn't make sense to me to use a multi-line regex unless you intend to slurp the entire file into memory (scalability issues) or you intend to create your own sliding buffer window (code complexity issues).

Cheers - L~R

Replies are listed 'Best First'.
Re^4: Multi-line regex help needed
by vxp (Pilgrim) on Jun 18, 2009 at 17:10 UTC

    I have to respectfully disagree there, what I posted and the "actual data" are one and the same (to the best of my knowledge)

    The full text file (redacted to get rid of an actual domain and IPs) is over here: http://www.yoda.im/pmonks.txt

      vxp,
      You can disagree all you want, but the data you posted is different than the code you ran against. See the following as proof: Again, I believe it is because the $ you pasted in your root node aren't really there in your real data. When I look at the data you linked against, I can see that the $ are in fact not there. I am not trying to be a pain, I am just explaining why the code I wrote for the data you provided isn't working against the data you need it to (they aren't the same).

      I did provide other suggestions by the way. Have you looked into those?

      Cheers - L~R

        Of course the $ isn't there - I said in the very first post that this is cat -vue's output :)

        cat -vue shows you all characters, including special characters (like the end of line $) - I thought it might be useful to see for regex crafting