File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes regular expression required Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "regular expression required" Watch "regular expression required" New topic
Author

regular expression required

Raaja Gotluru
Ranch Hand

Joined: Mar 02, 2010
Posts: 112
Hi,

I want to validate a filename with particular extension like jsp, bmp, png etc and it should allow the names with spaces and numerics.

How to write a regular expression for this.

thanking you.
--raaja. g
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4531
    
    5

Here's a good learning resource for RegEx: http://www.regular-expressions.info/


luck, db
There are no new questions, but there may be new answers.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Basic ideas:



Eric
 
Consider Paul's rocket mass heater.
 
subject: regular expression required