If you want to match the whole string exactly same as pattern i.e. [$XXXX] or [$XXXX-X] then you can go for it.
^\$([a-z|A-Z]{4})(-[a-z|A-Z]{1})*$
Else you can check below to search for matches similar to your pattern in long string.
\$([a-z|A-Z]{4})(-[a-z|A-Z]{1})*
Hope this will help you.. :)