REGEX for any file extension
^\.[^.]+$
This means start with .
and then anything other than dot (.
)
You can also use this one if you want to have only aplhanumeric.:
^\.[a-zA-Z0-9]+$
Try this regex:
^\.[\w]+$
Matches a string starting with a ".", followed by one or more "word" character(s), until the end of the string.
Try this regex, which matches all strings starting with a dot followed by at least one other character:
^\.[^.]+$