javascript thread: How do i do an exact match with Regular Expression.
try something like :
/^((htm(l)?)|(gif)|(jp(e)?g)|(swf)|(pdf))$/i
not tested but looks okay.
At 17:05 28/12/02 +0530, you wrote:
>Hi All,
> I have a pattern like this.
>
> "html","htm","gif","jpeg","jpg","swf","pdf".
>
>I am getting the file name throug <input type="file"> and validating with
>the pattern above. it is not searching for exact match.
>if i append "s" to the html file name,the match results returns true("i.e.,
>htmls").
>
>how do i achieve exact match in regular expression?.
>
>
>Any Idea on this would be greatly appreciated.
>
>
>Thanks in advance.
>
>
>
>Thanks and Regards,
>S.Ramkumar
>
>