Re: Regular Expression to validate file extension

From: Kevin Spencer (kspencer_at_takempis.com)
Date: 06/18/04


Date: Fri, 18 Jun 2004 15:42:53 -0400

In that case, Chris, it looks like boomfield has already guessed your
question, and given you a good answer!

BTW, there is an excellent freeware utility for building and testing Regular
Expressions, which you can download from:

http://www.weitz.de/regex-coach/

-- 
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
"Chris Kennedy" <chrisknospam@cybase.co.uk> wrote in message
news:u$rpRiUVEHA.3380@TK2MSFTNGP11.phx.gbl...
> Sorry about repost but my news server sometimes gets confused and appends
> the question to the wrong thread. I couldn't reply because I couldn't find
> it. You can sometimes find it on Google but not always. Has question not
> clarified things. I want an expression to check for a variable number of
> expressions in the extension of a file path e.g. jpeg or jpg or gif. I
hope
> this clarifies things. Regards, Chris.
>
>
> "Kevin Spencer" <kspencer@takempis.com> wrote in message
> news:uqerkXTVEHA.2840@TK2MSFTNGP11.phx.gbl...
> > I responded to this exact same question yesterday.
> >
> > -- 
> > HTH,
> > Kevin Spencer
> > .Net Developer
> > Microsoft MVP
> > Big things are made up
> > of lots of little things.
> >
> > "Chris Kennedy" <chrisknospam@cybase.co.uk> wrote in message
> > news:#gaLiDRVEHA.1048@TK2MSFTNGP09.phx.gbl...
> > > Does anyone know a regular expression that will validate the file
> > extension
> > > but also allow multiple file extensions if necessary. It also needs to
> be
> > > case insensitive. Basically, what I want is to validate a file input
box
> > to
> > > check if the extension is the correct type, i.e. .doc for a Word
> Document
> > > etc. Also I would like to check multiple file types, for instance
allow
> a
> > > gif or a jpeg or a jpg.
> > >
> > > Regards, Chris.
> > >
> > >
> >
> >
>
>


Relevant Pages

  • Re: Strong vs. Normal Thread Safety.
    ... frege wrote: ... Chris has a smart_ptr that can do this. ... Note that the expressions aren't atomic. ... Just the pointer loads and stores. ...
    (comp.programming.threads)
  • Re: List mutation method gotcha - How well known?
    ... Chris wrote: ... That's behavior of the interactive interpreter when printing results of expressions, ...
    (comp.lang.python)
  • Re: About being a teacher instead of a Macintosh consultant
    ... >>> Since about 20 or so people asked me on Friday about how the teaching ... and assuming that those were expressions of interest rather ... Chris ... Prev by Date: ...
    (uk.comp.sys.mac)
  • Re: Screen vs view vs world coordinates question
    ... "Chris Hastings" wrote in message ... > "Kevin Spencer" wrote in message ... >> the Graphics from your device, and draw on the screen. ... >>> screenCoord* projection.inverse you will get a view coordinate (in ...
    (microsoft.public.win32.programmer.directx.managed)
  • Re: New Table via ASP?
    ... "Kevin Spencer" wrote in message ... > Don't wonder why you didn't find it yourself, chris. ... >> The email address on this posting is a "black hole". ... >> spam. ...
    (microsoft.public.frontpage.client)