How would I just select a few varaibles using regexp

1 次查看(过去 30 天)
flag = 'KLAX 312353Z 27009KT 10SM FEW200 18/10 A3007 RMK AO2 SLP182 T01780100 10217 20178 55007'
METAR changes the amount of variables usually when reported I was hoping to get someone thought on how to do this using regexp.
I was thinking about using the regexp to find A3007. I know there are other ways, but I would like to learn how to use regexp.
This is what I have so far regexp(flag, A\4[0123456789]).

采纳的回答

Walter Roberson
Walter Roberson 2017-2-1
regexp(flag, 'A\d{4}', 'match')

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 File Operations 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by