Is there a way to extract a common pattern in a list of strings in Java?
For example, if we have a list of values:
001-L1
002-L2
003-L3
004-L4
...
Is there a way to deduce that we have 3digits, followed by '-', then a letter L and finally a numerical character?
I think it has something to do with common substrings or something like that but I haven't been able to find anything yet.
Thank you!
EDIT: Obviously it won't be a perfect recognition, it'll just return a recommendation based on the data.
What I'm trying to build is something close to this. In the video, when the user clicks on the column, there's a recommendation to split the data on ":".