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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Pattern Title
Expression
^\s* (?<signedNumber>(\+|\-){0,1}((\d*(\.\d+))|(\d*)){1}) (?<unit>((in)|(cm)|(mm)|(pt)){0,1}) \s*$
Description
CSS Length Unit Regex for cm, mm, in, pt (not px, ex, em)
Matches
+1.04in | 1.5cm | 4
Non-Matches
100+cm | 1.90.0 | 100px
Author Rating: The rating for this expression. Scott Willeke
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

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