MATLAB: Need to remove punctuation from a string that was pulled from a cell array

cell arraycell arraysstringstrings

I have a text file, and I am grabbing each line and entering that line into a cell array named 'input'. I am then applying a regex to remove punctuation from each cell.
The following code works, just as a test:
test = 'I''m testing to remove punctuation... Did it work?'
punct = regexp(test, '[^.,''!?]');
test = test(punct)
However, the code below is my actual code, and it does not work:
punct = regexp(input, '[^.,''!?]');
for i = (1:size(input))
temp = char(input{i})
input{i} = temp(punct)
end
I receive the following error on the line 'input{i} = temp(punct)'
Function 'subsindex' is not defined for values of class 'cell'.
Temp appears to be a character array (string) no different than test from above. However, Matlab seems to think it is still a cell, despite using curly braces to index it from input AND using char() to convert it (just to be sure).
Why is temp not acting like a proper string? How can I get this to work?
Thank you for your help.

Best Answer

FIXED:
Instead of attempting to use a regex, I simply used
input = erase(input, '!')
input = erase(input, '?')
...
and so on...
It feels a little hacky, but it's the only way I could get it to work through the cells.