I have strings in Java where each one is as follows: "Case Number XXX-XXX-XXX"
The "XXX-XXX-XXX" part is different for each string. I want to just extract the "XXX-XXX-XXX" portion of each string. I am assuming this is the third token in the string. What would be the best way of doing this? thanks.
ashkash 0
Newbie Poster
Recommended Answers
Jump to PostRegular expressions, Scanner, or String.split() will all work for that.
All 3 Replies
Ezzaral 2,714
Posting Sage Team Colleague Featured Poster
arun.reginald 0
Newbie Poster
stultuske 1,116
Posting Maven Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.