Hi I have this working code to detect a valid UUID pattern.
String pattern = "\\b[a-f0-9]{8}\\b-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-\\b[a-f0-9]{12}\\b";
Pattern r = Pattern.compile(pattern);
Matcher m = r.matcher(fileName);
This correctly detects strings like:
0101a8ef-db10-405a-a1d2-6bebdeb17625
I would like to add two exact strings on each side of this pattern like so:
FOLDER/0101a8ef-db10-405a-a1d2-6bebdeb17625.txt
Here is the code I am trying, but is not working:
String pattern = "FOLDER/\\b//[a-f0-9]{8}\\b-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-\\b[a-f0-9]{12}\\b.txt";
Pattern r = Pattern.compile(pattern);
Matcher m = r.matcher(uri.toString());
\b?FOLDER/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}\\.txtregex101.com/r/CJjLUP/1