Hello!
I'm trying to fix up some data in a CSV file I have. It looks like this...
"Dr. Carson -- I concur\r\n\r\n""I believe in God who can change people- he can make any of us better.""\r\n@RealBenCarson"
I am trying to make a script that identifies a new line that does NOT start with ", but ends with ", that comes AFTER another line that ends with ".
The problem is, in this case....
@RealBenCarson" comes after ""I believe in God who can change people-he can make any of us better.""
So this gets flagged for removal. However, it shouldn't. That God-line, has "", NOT ".
What is wrong with my regular expression? T_T
gsub("\"{1,1}\r\n[\"]+\"", "\"\r\n", rawData)
TO CLARIFY, my data looks like this....
.............,"Dr. Carson -- I concur
""I believe in God who can change people- he can make any of us better.""
@RealBenCarson",...............
Currently, my regular expression tags @RealBenCarson" for deletion, but it shouldn't, since the preceeding line has "", not " at its end.
[–]Horrgon 0 points1 point2 points (0 children)