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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Font Sizes
Expression
^\d+\x20*([pP][xXtT])?$
Description
It can be used to validate Font Sizes. Thanks to Gideon Engelberth for the shorter version of my original expression.
Matches
1px | 100 PT | 20Px
Non-Matches
1abc | px | 1 sdfs
Author Rating: Not yet rated. Vincent Faller
Source Gideon Engelberth
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: Simpler version
Name: Gideon Engelberth
Date: 4/4/2005 10:02:00 AM
Comment:
Here's a way to shorten and simplify your expression (using \x20 to get a space without making a group). ^\d+\x20*([pP][xXtT])?$ or with the case insensitive option it could be just ^\d+\x20*(p[xt])?$


Title: LOOK AT MORE DETAILS
Name: FIX
Date: 11/12/2003 12:52:56 PM
Comment:
I updated the regex look at more details!!!!!!!!


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