- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-17-2023 09:10 PM
Hi Team,
I have to add IP validation and It should be 0.0.0.0/XX to 255.255.255.255/XX range, Where XX can be 00 to 32 range numbers and / is optional.
I tried with validation regex in variable it self like below but it is not working.
Can someone please help me on this?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-17-2023 09:12 PM
Hi try below regex
^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\/([0-9]|[12][0-9]|3[0-2]))?$
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-17-2023 09:51 PM
Hi @lucky24
The selected validation regex from your screenshot is the OOTB one. You can find that record in the Question Regular Expression [question_regex] table.
Name: IP Address
URL: https://<instance_name>/question_regex.do?sys_id=f2f52405530020107d13ddeeff7b12d6
You can define your own regular expression for the variable.
Sample below.
^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}\/(?:3[0-2]|[0-2]?[0-9])$
 
Cheers,
Tai Vu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-17-2023 09:12 PM
Hi try below regex
^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\/([0-9]|[12][0-9]|3[0-2]))?$
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-17-2023 09:51 PM
Hi @lucky24
The selected validation regex from your screenshot is the OOTB one. You can find that record in the Question Regular Expression [question_regex] table.
Name: IP Address
URL: https://<instance_name>/question_regex.do?sys_id=f2f52405530020107d13ddeeff7b12d6
You can define your own regular expression for the variable.
Sample below.
^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}\/(?:3[0-2]|[0-2]?[0-9])$
 
Cheers,
Tai Vu