File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

regular expression required

Raaja Gotluru
Ranch Hand

Joined: Mar 02, 2010
Posts: 118

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

Joined: May 03, 2008
Posts: 5115

Here's a good learning resource for RegEx:

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

Joined: Nov 08, 2001
Posts: 15385
Basic ideas:

I agree. Here's the link:
subject: regular expression required
It's not a secret anymore!