Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Regular expression help for Price
#9
Not Solved
Hopefully this will do it


Code:
(^[\$]?[\d]{1,3}[,]?[\d]{3}[,]?\d{3}(\.\d{2})?$)|(^[\$]?[1-9]{1}[0-9]{1,2}[,]?\d{3}(\.\d{2})?$)|(^[\$]?[8]{1}[,]?[5-9]{1}[0-9]{2}(\.\d{2})?$)|(^[\$]?[9]{1}[,]?\d{3}(\.\d{2})?$)


This should allow anything > 8500 to 999,999,999.99. If you need a larger number than that it will have to be modified. it should also allow "$", "," and "." as optional, however if there is a decimal it must have 2 digits after.
Reply


Messages In This Thread
Regular expression help for Price - by bostonma - 03-01-2011, 01:52 AM
RE: Regular expression help for Price - by jsknight1969 - 03-16-2011, 10:23 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Need Any digit in xpath path using Regular expression Priyam 1 3,272 10-05-2016, 11:05 AM
Last Post: Ankur
  Regular expression to read two words in lowercase, uppercase and with and without spa sarahq49 1 3,217 04-09-2015, 01:56 AM
Last Post: sarahq49
  Regular expression and script optimisation Padmavathy 1 3,632 03-30-2015, 11:46 AM
Last Post: supputuri
  Regular expression in descriptive programming testernc 1 16,416 12-08-2014, 06:38 PM
Last Post: anshika.agarwal
  need a regular expression. anu05446 0 3,036 11-26-2014, 03:00 PM
Last Post: anu05446

Forum Jump:


Users browsing this thread: 1 Guest(s)