Hi Bob ,
Thanks for your feedback.
Oh, yes, because your quote is not stay together with newline, so I think
Mike's suggestion does not meet your need.
For your issue, I think this is not regex problem, what you need is a good
algorithm to parse your string.
After some thinking, I may find one algorithm for you. Maybe it is not the
best one, but it should work for you:
First, you may split the input string into a string array with "\n"
Then, you should loop through each short string array to count each string
array item's quotes number, the key point is to determine if the array's
quote number is odd number or even number.
At last, you may concatenate the string array through the rule below:
1. Once you find an array item has even number of quotes, just leave and
jump it.
2. If it has odd number of quotes, mark it as start concatenate array item,
find next array item that has odd number of quotes. Then concatenate all
the items between 2 items that have odd number quotes.
3. continue the above 2 steps.
I hope I have explained this algorithm.
=========================================
Please apply my suggestion above and let me know if it helps resolve your
problem.
Thank you for your patience and cooperation. If you have any questions or
concerns, please feel free to post it in the group. I am standing by to be
of assistance.
Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! -
www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.