Refer to the character ' in a string

7 views (last 30 days)
Edward on 31 Mar 2013
Hi, i'm trying to write an algorithm to remove the character ' from a string, say for example: string='you're';
where I want to remove the ' to make the string 'youre' I get errors when I try to refer to a character as ''' though,
is there something I'm missing?

Answers (1)

Walter Roberson
Walter Roberson on 31 Mar 2013
string(string == '''') = '';

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by