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

20 visualizzazioni (ultimi 30 giorni)
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.

Risposta accettata

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

Più risposte (0)

Categorie

Scopri di più su Characters and Strings in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by