in reply to Re^2: Modifying Parse::RecDescent Grammar to deal with multiline property file entries
in thread Modifying Parse::RecDescent Grammar to deal with multiline property file entries

yeah you could do something like
/.*(?=(^[^=]+=|\Z))/ # not tested, but should be about right
Or you could use the code... set a flag when you find a propname and unset only except continuation lines when it is set. If you need to look at the prop as one piece just build a parse tree... that usually is the better way to go unless you are working on a huge dataset or a real time stream. And, as you say, you could pop it back together in simpleprop.

Of course.. unless you need them it is often easier to pre-process out the comments.

                - Ant
                - Some of my best work - (1 2 3)

  • Comment on Re^3: Modifying Parse::RecDescent Grammar to deal with multiline property file entries
  • Download Code