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

Please support RegExLib Sponsors

Sponsors

Expressions by User

   Displaying page 1 of 1 pages; Items 1 to 4
Title Test Details Oracle Binding Variables
Expression
(:[a-z]{1}[a-z1-9\$#_]*){1,31}
Description
This matches oracle binding variables in SQL. Not sure if it is the same with other RDBMS'
Matches
:x | :x1 | :x#2$
Non-Matches
:1x | :@x | :*ac
Author Rating: Not yet rated. Mike Willbanks
Title Test Details US Telephone
Expression
^\(?([0-9]{3})\)?[\s\.\-]*([0-9]{3})[\s\.\-]*([0-9]{4})$
Description
Basically I didn't like any of the regular expressions that were available because they all failed at parsing them into variables correctly... This regular expression gives you the full match and then the 3 sections of digits seperately.
Matches
(000) 000-0000, 0000000000, 000.000.0000
Non-Matches
000/000/0000, 00a.000.000, +000.000.0000
Author Rating: The rating for this expression. Mike Willbanks
Title Test Details Percent Expression
Expression
^\s*(\d{0,2})(\.?(\d*))?\s*\%?\s*$
Description
Basically this matches into variables for percentages.. It allows as much whitespace before and after the expression. $1 = Percent before decimal, $2 = percentage after decimal inc decimal, $3 = percentage after decimal. Disallowed anything past 99.99999 repeating percent. No negative percents either. Easy to implement but I do not need it.
Matches
10.5%, 1%, 1, .5, .0555%
Non-Matches
100%, -1%, -1, 200, 200.1
Author Rating: Not yet rated. Mike Willbanks
   Displaying page 1 of 1 pages; Items 1 to 4

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