Removing Letters from String of Letters and Numbers
3 views (last 30 days)
Show older comments
Hello,
I have 60,000+ rows of values in a table.
I have a serial number row that has 60,000 serial numbers.
Example: "XYZ123456789123".
All serial numbers start with XYZ. How do I create a column next to it with only the last 12 numbers in it for all 60,000 rows?
Thanks!
0 Comments
Accepted Answer
Cris LaPierre
on 22 Mar 2021
You could use extractAfter
s=["XYZ123456789123";"XYZ123456789126"]
% use postion
n1=extractAfter(s,3)
% Use pattern
n2=extractAfter(s,"XYZ")
More Answers (0)
See Also
Categories
Find more on Data Type Conversion in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!