Read specific string in a large text lines
1 次查看(过去 30 天)
显示 更早的评论
I have lines in a text file like this
</TypeInfo><TypeMaxValue>65535</TypeMaxValue> <TypeMinValue>0</TypeMinValue><Name>Rick</Name>
How can I textscan and bring just
<Name>Rick</Name>
into my cell array?
0 个评论
采纳的回答
Brian Hannan
2017-8-10
5 个评论
Brian Hannan
2017-8-10
Take a look at the regexp documentation for some ideas. There's an example over there that solves this problem. It's titled "Capture Substrings of Matches Using Ordinal Tokens".
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Text Files 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!