I am using regex function in Apache Nifi to find the folder name in file path but it doesn't seem to give me correct result
I want to parse out "state" and "date" with two different regex from this file path
/upload/main/state/02022021/
This was the regex i used
${ "absolute.path":replaceFirst( ".*[/\\\\]{1}([a-zA-Z]+)[/\\\\]{1}(\d{8}).?$", "$1") }
${"absolute.path":replaceFirst(".*(\d{8}).+$", "$1")}