Posts: 27
Threads: 14
Joined: Jan 2009
Reputation:
0
03-01-2011, 01:52 AM
Hello All,
can someone help me guide how I can add regular experession for a Price which is dynamic
For ex: Price is 8975 or 8975.99
I would like to add a checkpoint to make sure value is always >8500
How can I do this?
Posts: 189
Threads: 0
Joined: Jul 2009
Reputation:
1
03-01-2011, 09:51 AM
Hi Bostonma,
Roundup the decimal no and then check if it is greater than 8500.
Posts: 27
Threads: 14
Joined: Jan 2009
Reputation:
0
03-02-2011, 03:18 AM
JSKnight,
Can you please explain how the first part works?
(^[1-9]{1}\d{4,9}\.\d{2})|
Posts: 27
Threads: 14
Joined: Jan 2009
Reputation:
0
03-09-2011, 12:13 AM
(This post was last modified: 03-09-2011, 12:35 AM by bostonma.)
Sorry for the delay in response.
ThankYou for the detailed explanation,definitely helps!
Jsknight,
I Tried with your code but error is displayed.Is the third part optional because in my case the value is 8500.So I'm wondering if it is looking for .9x?
Posts: 5
Threads: 0
Joined: Aug 2010
Reputation:
0
03-09-2011, 11:06 AM
To make the decimal point optional,
(^[1-9]{1}\d{4,9}[\.\d{2}]?)|(^[8]{1}[5-9]{1}[0-9]{2}[\.\d{2}]?)|(^[9]{1}\d{3}[\.\d{2}]?),
So it will work for 8585 as well as 8585.99 also
Thanks
Nanthini
Posts: 27
Threads: 14
Joined: Jan 2009
Reputation:
0
03-11-2011, 03:05 AM
Thanks much Nanthini. It still failed and I noticed we have a dollar sign,comma and period at the end as well within Price.My bad I did not mention this before.
Ex: $8,599.97.
Can you be kind enough on how to accommodate these as well?please?
Again the period at the end should be optional as well.