Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to Use Regular Expression for IP Address
#1
Not Solved
Hi All,
How to Use Regular Expression for IP Address..I want to check the Address in the range 0-255.
so i used the Regex like (25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)

But i am getting confuse where i have to apply this Regex.

For Ex i have one Filed GateWay..its a Text Box
so properties are type,name,html tag,Value,Default Value...

Code:
Browser("xyz").page("xyz").WebEdit("gateway").set "192.168.1.25"
So in above script i want to use Regex..

so please tell me the flow where i have to put Regex...i mean on which property and how to put??
Reply
#2
Not Solved
ok

First do u want to set or validate an Ip Address ?!!!!!

in set i dont see any use of regular expression

If u want to validate the simplest thing would be

Get the octet and see if it is between 0 to 255 and again

Do you have a Class restriction onthe Ip address

regards
Kishore
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
At Regular Expressions for e-mail address ganesh.dengale 6 19,270 08-23-2022, 02:51 PM
Last Post: ahmad3029
  Need Any digit in xpath path using Regular expression Priyam 1 3,519 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,390 04-09-2015, 01:56 AM
Last Post: sarahq49
  Regular expression and script optimisation Padmavathy 1 3,854 03-30-2015, 11:46 AM
Last Post: supputuri
  Regular expression in descriptive programming testernc 1 16,631 12-08-2014, 06:38 PM
Last Post: anshika.agarwal

Forum Jump:


Users browsing this thread: 1 Guest(s)