I am struggling a bit to create a regex matching pattern to be used with matches() method of String. My String value is something like -
I am using the String.matches("regex") method but to be honest struggling to create the pattern which will match the String values like these. I did try a few different combos but in vain so for. Searched on the internet for some examples. The values are always going to be in similar format though the length might vary.
Any help is much appreciated.
There is more to matching just .xml
Well, apart from the example given there will be other values too in the List, so I need to match like
The list of values could be like -
3012145A_20348409-146139460.ABCDxyzPQr.1.1.xml 3012145_Error.xml 3012145_UK.pdf 3012145A_20348409.ABC.10.10.10.xml
I need the first value among these
I tried this -