I don't know enough about regex to come up with a smarter way to turn a list of addresses from blocks into single lines.
Here's an example:
@sdfqsdf
qsdfqdsf
USA
@sdfqsdf
qsdfqdsf
USA
etc.
I currently use the brain-dead regex:
SEARCH ^@(.+?)\r\n(.+?)\r\n(.+?)\r\n(.+?)\r\n\r\n
REPLACE \1, \2, \3, \4\r\n
It's not very good because it assumes each address has four lines, and besides, it's kludgy.
I guess a smarter solution would be to tell the Perl (Boost) regex engine that a block ends with two CRLF's and that each line in between that ends with a single CRLF should have it stripped and replace with a comma, but I have no idea how to do this.
Has someone done this before and could tell me?
Thank you.