Im trying to edit filename attribute with UpdateAttribute
processor. I've created attribute name which is containing C:\Program Files\Filebeat\test-kafka\test_csv.csv
. I would like to update filename attribute into test_csv.csv
.
this is what i've done to change filename
${filename:replaceAll('.+\\', '')}
and
${filename:replaceAll('.+[\\]', '')}
But the problem is, seems like it failed to escape backslash. I could make filename as C:\Program Files\Filebeat\test-kafka\test_csv.csv
successfully but I want to name the file just as the file name not the whole directory. Did i miss something?