Sorry i missed your reply :\
This should work just fine:
Pattern p = Pattern.compile("^(\\w+[-]\\w+).html");
What that says is:
^ means the beggning of the line. it gets rid of problems like asd$#!%sd-tasd.html
\\w A word character: [a-zA-Z_0-9]
+ one or more character
() mean to take the entire input
Sorry about my previous reply, i wasnt quite awake

.
small note: you dont need the \\ for -. You can have them, it wont hurt anything, but they are not required since - is not a special character.