Adalat  Khan

Adalat Khan

  • 651
  • 1.5k
  • 865.5k

Regular Expression

Oct 24 2019 8:29 AM
I have value in the following format:
 
144556-1/5/256
 
Before dash the value must be one digit or maximum six digits. After dash the value is acceptabl from 0 to 256. if it contain one digit then it shoud display like this:
 
144556-1
 
If after dash the value contain two digits then it will be separated by slash and should display like this:
 
144556-1/5
 
If after dash the value is three digits then it shoud display like this:
 
144556-1/5/2
 
Please help me how to write Regular Expression for this. Thanks 

Answers (1)