Anyone able to help... I am parsing a csv file and wish to find the quoted strings (in addition to other things). {id:19852,name:'Fred's House',Number:68}, currently the RegEx I have : {id[\d]+),name:'\d([A-z \']+) This stops at the first apostrophe giving me up to "Fred"... To add the confusion the field 'may' also have a comm in it!! I'm sure there's a way of doing this...! Any help greatfully received.
Your CSV file terminates fields at apostrophes, so you will need to escape the ones in the data. So, your CSV file would read: Code: {id:19852,name:'Fred\'s House',Number:68}, And your regex would be: Code: {id:([\d]+),name:'\d([A-z ([^\\]\')]+) The extra [^\\] means not to include ones which are preceded by a \ (untested)