I am trying to write a java regular expression where my application should restrict the names of the files or filetypes mentioned in the regex from being attached to an email. I started the regex like this,
Is this correct?. Right now it is not working(matching). Not sure where I am going wrong. Also, how can I add new file types or filenames to this expression incase if I want to expand this regex. Like say, I want to add the vcf file types also here in this regex, how should I do that? Also, If I need to add the filenames, say abc.bmp from being attached, how and where should I include that filename in this regex?. Any help is greatly appreciated as I am new to this regex.
Darryl , I can't use Swing in my application. So I need to use a regex. This regex will be in a configuration page in my application where the user(client) can modify it to notify the filetypes or file names that they want to ignore from processing. So once my application receives a file, it will get this regex and do a compare with the current file to check if it matches the pattern. If it matches, I should ignore the file. The current regex that I have is
Do you think if I am missing something here?. for some reason this doesn't work for me.