Regular expression for blood pressure
I have the following regex to validate blood pressure values ββas systolic / diastolic:
\b[0-9]{1,3}\/[0-9]{1,3}\b
The expression works with the only drawback that it allows more than one consecutive slash (/) to be used. For example, he allows it 2/2/2
. I want it to only allow number format from 1 to 999 and forward slash and then number from 1 to 999. For example 83/23, 1/123, 999/999, 110/80, etc. Can someone help me?
The only other expression I found here is : ^\b(29[0-9]|2[0-9][0-9]|[01]?[0-9][0-9]?)\\/(29[0-9]|2[0-9][0-9]|[01]?[0-9][0-9]?)$
but it doesn't work.
By the way, I am using jquery.
Thank.
+3
source to share