Effacer les filtres
Effacer les filtres

How to replace double quotes with two single quotes in string in MATLAB R2020 ?

10 vues (au cours des 30 derniers jours)
a = regexprep(' "C:\Users\User's PC\Desktop\note.txt" ' , ' " ' , ' ' );
a = regexprep(' "C:\Users\User's PC\Desktop\note.txt" ' , ' " ' , '');
Invalid expression. Check for missing multiplication operator, missing or unbalanced delimiters, or other syntax error. To construct matrices, use brackets instead of parentheses.

Réponse acceptée

Walter Roberson
Walter Roberson le 7 Oct 2021
a = regexprep(' "C:\Users\User''s PC\Desktop\note.txt" ' , '"' , '''''' )
a = ' ''C:\Users\User's PC\Desktop\note.txt'' '

Plus de réponses (0)

Catégories

En savoir plus sur Characters and Strings dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by