I have the following possibilities:
' !This is a string! ''!This is a string !''! This is a string !'' ! This is a string! '' ! This is a string '
In all of these case I want to match
'This is a string'
Heres what I tried so far:
/\s*!(.*)!{0,1}
/\s*!(.*?)!{0,1}
But it either gobbles up the ! or doesn’t match at all. Note that the ! at the end is optional.
Or maybe this one