Regexp Find Digit between two hyphens
9 views (last 30 days)
Show older comments
Mark Krzysztopik
on 23 Oct 2019
Answered: Walter Roberson
on 23 Oct 2019
I have a str that looks like this:
str = '7-6-1'
and I would like to return 6.
I was able to return 7 using ^[^-]*[^ -] but can't seem to find the expression to return the second item.
0 Comments
Accepted Answer
More Answers (0)
See Also
Categories
Find more on Characters and Strings 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!