I would like to format a text. I mean something like this: I'd like to transform this:
"something'text between apostrophes'text"
into
"something 'text between apostrophes' text"
I want to add spaces from both sides, but keep te string in '' the same. I tried to do it like this:
Arkusz1.Cells(1, 1).Replace What:="'*'" Replacement:=" '*' "
But its result is:
"something '*' text"
Arkusz1.Cells(1,1) contains the string I want to replace. Is it possible to do this?
Thanks
You can try this regex:
('[^']+')
and replace by this:
" $1 "
Regex 101 Demo
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With