hi ive got this segment of code that im struggling with the code does what i want it to do in the sense that if i put in the filename of the file that i have created it works but for a random user the code will not produce the desired result.
heres the code:
m/^[a-zA-Z\_]{1}[a-zA-Z0-9\_]{7}(\.txt|\.TXT)$/)
this essentially works apart from the {1} & {7} what i want this to do is match any letter or underscore once then accept input of 7 letters\digits or underscore characters and obviously .txt as its a file however if i put in say 12 characters its still saying that its correct which of course is wrong it appears im doing something wrong but what it is i just cant see.