I would like to achieve this amazing result (I'm using Ruby):
input: "Joe can't tell between 'large' and large."
output: "Joe can't tell between large and large."
getting rid of the quotes but not of the apostrophe
how can I do it in a simple way?
my failed overcomplicated attempt:
entry = test[0].gsub(/[[']*1]/, "")
Simplest one for your situation could be something like this.
Regex: /\s'|'\s/
and replace with a space
.
You can also go with /(['"])([A-Za-z]+)\1/
and replace with \2
i.e second captured group.