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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Fractions / Fractional Odds
Expression
^\d+\/?\d*$
Description
This simple expression is used to validate fractions or UK odds. It will match integers, allowing 10/1 to be entered as 10, and fractions. It will not match negative numbers or fractions, spaces or any alphabetical characters.
Matches
10 | 2/3 | 100/30
Non-Matches
-10 | -2/3 | text | 10 / 1 | 42/7eok
Author Rating: Not yet rated. Paul Verhulpen
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: 0/0 is allowed
Name: John Joseph
Date: 7/22/2014 2:53:25 PM
Comment:
0/0 isallowed


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