Method RegEx():createIPAddress() Foundation
Creates a RegEx instance for IP address validation.
:createIPAddress( [<nVersion>] ) --> oRegEx
The pre-configured RegEx object.
Factory method that creates a pre-configured RegEx object for validating IP addresses. Supports both IPv4 and IPv6 formats.
IP address
oIPv4 := RegEx():createIPAddress(4)
? oIPv4:test("192.168.1.1") // .T.
oIPv4:destroy()
oIPv6 := RegEx():createIPAddress(6)
? oIPv6:test("2001:0db8::8a2e:0370:7334") // .T.
oIPv6:destroy()
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.