RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Pattern Title
Expression
(.*\.jpe?g|.*\.JPE?G)
Description
I just couldn't find any simple expression to check if an entered value is a jp(e)g. If you're using this to check for e.g. mp3, just use the following: (.*\mp3|.*\.MP3) This expression is not really stable, cause it will also match file.jpg.mp3 or stuff like that.
Matches
*.JPG | *.jpeg
Non-Matches
.gif
Author Rating: The rating for this expression. N Verlaan
Source
Your Rating
Bad Good

Enter New Comment

Title

Name

Comment

Spammers suck - we apologize. Please enter the text shown below to enable your comment (not case sensitive - try as many times as you need to if the first ones are too hard):

Existing User Comments

Title: Rule out .jpg.mp3
Name: John
Date: 6/30/2010 8:37:59 PM
Comment:
\z Matches at the end of the string the regex pattern is applied to. Matches a position rather than a character. Never matches before line breaks. .\z matches f in abc\ndef Would this work?


Title: Rule out .jpg.mp3
Name: John
Date: 6/30/2010 8:37:53 PM
Comment:
\z Matches at the end of the string the regex pattern is applied to. Matches a position rather than a character. Never matches before line breaks. .\z matches f in abc\ndef Would this work?


Copyright © 2001-2025, RegexAdvice.com | ASP.NET Tutorials