Here you will find useful information either here or here , all of which are the results of the first page of Google and would be faster than asking a question here.
Anyway, a quick dirty way: you can filter the <> characters:
>> s = '<em style="font-size:medium"> 5,888 </em> <sometag> test </sometag>' >> a = regexp(s, '[<>]'); >> s( cell2mat(arrayfun(@(x,y)x:y, a(2:2:end-1)+1, a(3:2:end)-1, 'uni',false)) ) ans = 5,888 test
Or, a little more reliable and cleaner, replace everything between any tags (including tags) with an empty one:
>> s = regexprep(s, '<.*?>', '') ans = 5,888 test
source share