...
FILENAME = FEATURE_NAME.replaceAll("[^a-zA-Z0-9]", " ").replaceAll("\s+", "-").trim().toLowerCase();
Replace all non alphanumeric characters with single space [^a-zA-Z0-9] → “ “
Replace multiple spaces with dash \s+ → “-“
Trim
Transform to lowercase
...