Does anyone know of a vbscript which will remove just the leading and trailing spaces within quotes. I couldn't find anything online which used vbscript to do this. Plenty about just removing the quotes etc. I have tried several ways of doing this without success. I couldn't find any way of distinguishing between opening quotes and closing ones as the pattern is the same (space "space ). I have been asked to clean up some text but have no idea how such an extraneous style of spacing came to be used. A simple sample follows but obviously where punctuation gets in the way it becomes awkward.
What I have got is: " now is the " time for all good men to " come to the aid " of the party
What I need is: "now is the "time for all good men to "come to the aid" of the party
I am not conversant with Powerscript (although I ought to learn it) so have been falling back on vbscript. Some of the files have nearly a mb of text so it would be a soul
destroying exercise to do it manually or even use "find and replace" as the latter would not cover all instances. If anyone can help I would be grateful.
Sadly I have no way of knowing. I am not aware of any software which would behave automatically in this way. Following a data weed the text files were passed to me to do the necessary. Of course just because we follow the English convention, it doesn't mean that other countries should do likewise so perhaps this is the normal format for them. Thank you for your interest anyway.
I don't know what a data weed is but it doesn't make any difference. Seems to me that the "find and replace is your best option. I don't know why you think that wouldn't find all of the instances. Maybe one of the other guys will jump in here with a batch file to do the same thing (been way too long since I last wrote a batch file).
One of the problems with find and replace is that it is not possible to differentiate between an opening quote and a closing quote as the search pattern [ " ] would be the same . The opening quote part would be replaced correctly but with the closing one the actual quote character would end up being adjacent to the first character of the following text instead of leaving a space eg the "real " McCoy would turn out as the "real"McCoy. If someone has a batch file I'd jump at the chance of using that instead of vbscript.
The more I think about it, I wonder if this is a prank. If it is, it's a good one and I got suckered into to it. If not, please forgive me for making that suggestion.