Please can you give me some regular expression help
1 次查看(过去 30 天)
显示 更早的评论
Hi,
I'm trying to extract a number from a string. The string is of the form H970D80Dia4W19L19WT856 and I want to extract the number after the 'D', in this case 80. But regular expressions are confusing me, I can get this far
regexp(file.name,'[D]\d+','match')
Which gives 'D80', but I can't get rid of the 'D'. Can you help me with this? The strings may be different lengths and can have a different number of characters to the left and right of what I want to extract.
Also is there a good cheat sheet I can print for future reference?
0 个评论
采纳的回答
更多回答(1 个)
另请参阅
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!