Hi I was wondering how I can do this in matlab: I have a file and somewhere in the file i have this string = “1 to 10 of 434M” . I would like to get the “434M”. Though keeping in mind that the M can also be other letters (K or B), but is always a capital letter. The ciphers before the letter can be up to 3 chippers, but can also be smaller.
How would I get this out of a text in matlab?
Assume that you read your file line by line. Then for each line execute the following commands:
This regular expression matches at least one digit before
M. (E. g. also 451274M) If it should only match numbers with 1 to 3 digits use: