Input string could be :
- "his 'pet''s name is tom' and she is 2 years old"
- " '''' "
- " '' "
- "function('name', test, 'age')"
I want to get the single quote string from these inputs which may even contain ''
inside the single quote string.
I tried negative lookahead (?!')
to ignore the ''
while matching.
'.*?'(?!')
I expect output of
- 'pet''s name is tom'
- ''''
- 'name' and 'age'