examples:
"""Romeo and Juliet"""
'another string that is quoted with '' single quotes'
the problem is that the string can have characters used for db escaping even in it’s beginning and end, so regex should look if given char is used in sequence of odd length that is 1,3,5… at the end of matched string
Try this regex:
'(?:[^']|'')*'for single quotes. The same for double quotes, i.e. full regex:In string
hello 'my ''beautiful''' 'world'! """Romeo and Juliet"""it will find:'my ''beautiful''''world'"""Romeo and Juliet"""