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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Pattern Title
Expression
^([-]?[0-9]?(\.[0-9]{0,2})?)$|^([-]?([1][0-1])(\.[0-9]{0,2})?)$|^([-]?([1][0-3](\.[0]{0,2})))$
Description
This was made for specifying GMT offsets with 2 decimal places. It will validate any number from -12 to 13 with 2 decimal places.
Matches
5 | -11.99 | 12.00
Non-Matches
13 | -11.999 | 12.01
Author Rating: Not yet rated. Stewart Schatz
Source Stewart Schatz
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: JAVA developper
Name: Chris
Date: 11/24/2004 9:37:38 AM
Comment:
It is a good script, however I have to correct one small thing: GMT offset if from -12.00 to +13.00 because Tonga island and Nuku'alofa are on the International Date Line. Tonga Standard Time is 13 hours ahead of Greenwich Mean Time (GMT+13). [email protected]


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