For example:
string text = 'some text "and some more" and some other "this is a second group" okay the end';
.
I'd like to capture all the spaces that are between quotation marks. The end goal is to replace those spaces with commas.
The end goal, for example:
'some text "and,some,more" and some other "this,is,a,second,group" okay the end'
For example, this would do what I'd like in javascript:
text.replace(/(["]).*?\1/gm, function ($0) {
return $0.replace(/\s/g, ',');
});
Unfortunately, the only tool I have available is the find/replace feature of textmate.
I've found another that does the opposite of what I need, but uses one line like I need:
text.replace(/\s+(?=([^"]*"[^"]*")*[^"]*$)/gm, ',');
Thanks!