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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Pattern Title
Expression
^(?!\u00a2) #Don't allow cent symbol \p{Sc}? #optional unicode currency symbols (?!0,?\d) #don't allow leading zero if 1 or more unit (?:\d{1,3} # 1 to 3 digits (?:([, .])\d{3})? # if there is a separator it must be followed by 3 digits (?:\1\d{3})* # if the is more than two groups the same separtor must but used, it must be followed by 3 digits |(?:\d+)) # more than 3 digit with no comma separator ((?!\1)[,.]\d{2})?$ # option cents
Description
Internationally capable currency formats. It is NOT local aware. Should be modify for local specific validations. More detail at http://blogs.regexadvice.com/mash/archive/2004/06/08/1246.aspx
Matches
$9,876,543.21 | €9 876 543,21 | €9.876.543,21
Non-Matches
9.876.543.21 | 9,876,543,21 | 9 876 543 21
Author Rating: Not yet rated. Michael Ash
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: skibidi dop dop dop yes yes skibidi dop deep deep
Name: KSI
Date: 12/11/2024 10:20:53 PM
Comment:
She was more like a beauty queen from a movie scene I said, "Don't mind, but what do you mean, I am the one Who will dance on the floor in the round?" She said I am the one Who will dance on the floor in the round She told me her name was Billie Jean as she caused a scene Then every head turned with eyes that dreamed of bein' the one Who will dance on the floor in the round People always told me, "Be careful of what you do Don't go around breakin' young girls' hearts" (hee-hee) And mother always told me, "Be careful of who you love And be careful of what you do (oh-oh) 'Cause the lie becomes the truth" (oh-oh), hey-ey Billie Jean is not my lover She's just a girl who claims that I am the one (oh, baby) But the kid is not my son (hoo) She says I am the one (oh, baby) But the kid is not my son (hee-hee-hee, no-no, hee-hee-hee, hoo) For forty days and for forty nights, law was on her side But who can stand when she's in demand? Her schemes and plans 'Cause we danced on the floor in the round (hee) So take my strong advice Just remember to always think twice (Do think twice) do think twice (ah-hoo) She told my baby we'd danced 'til three, then she looked at me Then showed a photo of a baby cryin', his eyes were like mine (oh, no) Go and dance on the floor in the round, baby (ooh, hee-hee-hee) People always told me, "Be careful of what you do And don't go around breakin' young girls' hearts" (don't break no hearts, hee-hee) But she came and stood right by me Just the smell of sweet perfume This happened much too soon She called me to her room, hey-ey Billie Jean is not my lover (hoo) She's just a girl who claims that I am the one But the kid is not my son No-no-no, no-no, no-no-no (hoo) Billie Jean is not my lover She's just a girl who claims that I am the one (oh, baby) But the kid is not my son (no, no) She says I am the one (oh, baby) But the kid is not my son (no, hee-hee-ho, hee-hee-hee) Hee, hoo She says I am the one But


Title: French format
Name: Toni
Date: 5/19/2005 7:41:54 PM
Comment:
In java the space should be escaped: (?:([,.\ ])\d{3})?


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