I am using regular expression for checking the subnet masking. I use ajax txtbox with masking value but that is not working, then I switched to a textbox and applying a regular expression for that. unfortunatly that one is also not working.
Can you help me out to give a RE for subnet masking 255.255.255.255
Or any best way to do that?
Solution:
I was using masked text box and don't know how to put validation expression.
Finally I found a property of masked text box as validation expression, and there I put the RE and change the property validate to true.
No need to use validator expression explicitly.
Thanks
you can use this regex to validate subnet
^(((255\.){3}(255|254|252|248|240|224|192|128+))|((255\.){2}(255|254|252|248|240|224|192|128|0+)\.0)|((255\.)(255|254|252|248|240|224|192|128|0+)(\.0+){2})|((255|254|252|248|240|224|192|128|0+)(\.0+){3}))$
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With