how to remove certain characters from a string in a file
    4 visualizzazioni (ultimi 30 giorni)
  
       Mostra commenti meno recenti
    
how to remove certain characters from a string based on some condition ie i have a text in a file '32/4/5' i want to retain only 32 and delete rest .my condition is if a '/' is identified then rest characters should be deleted .
0 Commenti
Risposta accettata
  Kye Taylor
      
 il 20 Dic 2012
        
      Modificato: Kye Taylor
      
 il 20 Dic 2012
  
      Similar to @Srinivas, you could try
str = '32/4/5';
str = regexprep(str,'/.*','');
Più risposte (1)
Vedere anche
Categorie
				Scopri di più su String Parsing 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!


