Start a new topic

RACE : Regular expressions functionality

Regular expressions functionality needs to be implemented to provide capability to define the decimal values and length after decimal.


Reference customer:Dominion

1 Comment

Below is the solution for regular expression functionality - 


 

1. Validate the label text as “Water (lbs/MMSCF)

Verify the format of the value entered.
Result: value entered rounded to 2 decimals

Solution: ^([0-9]*)(\\.([0-9]{0,2})?)?$

2. Validate the label text as “Dew Point (Deg. F)”
Verify the format of the value entered.
Result: value entered rounded to 1 decimal

Solution^([0-9]*)(\\.([0-9]{0,1})?)?$

3. Validate the label text as “Field Oxygen (PPM)”/Field Carbon Dioxide/Field Hydrogen 
Sulfide
Verify the format of the value entered.
Result: value entered rounded to 3 decimals

RACE should provide capability to define the number of digits (max) before and after the decimals.

Solution^([0-9]*)(\\.([0-9]{0,3})?)?$

Login or Signup to post a comment