IPV4
^((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?)$
IPV6
^([da-fA-F]{1,4}:){6}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?)$|^::([da-fA-F]{1,4}:){0,4}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?)$|^([da-fA-F]{1,4}:):([da-fA-F]{1,4}:){0,3}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?)$|^([da-fA-F]{1,4}:){2}:([da-fA-F]{1,4}:){0,2}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?)$|^([da-fA-F]{1,4}:){3}:([da-fA-F]{1,4}:){0,1}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?)$|^([da-fA-F]{1,4}:){4}:((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?)$|^([da-fA-F]{1,4}:){7}[da-fA-F]{1,4}$|^:((:[da-fA-F]{1,4}){1,6}|:)$|^[da-fA-F]{1,4}:((:[da-fA-F]{1,4}){1,5}|:)$|^([da-fA-F]{1,4}:){2}((:[da-fA-F]{1,4}){1,4}|:)$|^([da-fA-F]{1,4}:){3}((:[da-fA-F]{1,4}){1,3}|:)$|^([da-fA-F]{1,4}:){4}((:[da-fA-F]{1,4}){1,2}|:)$|^([da-fA-F]{1,4}:){5}:([da-fA-F]{1,4})?$|^([da-fA-F]{1,4}:){6}:$
IPV4/IPV6
^((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?)$|^([da-fA-F]{1,4}:){6}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?)$|^::([da-fA-F]{1,4}:){0,4}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?)$|^([da-fA-F]{1,4}:):([da-fA-F]{1,4}:){0,3}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?)$|^([da-fA-F]{1,4}:){2}:([da-fA-F]{1,4}:){0,2}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?)$|^([da-fA-F]{1,4}:){3}:([da-fA-F]{1,4}:){0,1}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?)$|^([da-fA-F]{1,4}:){4}:((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?)$|^([da-fA-F]{1,4}:){7}[da-fA-F]{1,4}$|^:((:[da-fA-F]{1,4}){1,6}|:)$|^[da-fA-F]{1,4}:((:[da-fA-F]{1,4}){1,5}|:)$|^([da-fA-F]{1,4}:){2}((:[da-fA-F]{1,4}){1,4}|:)$|^([da-fA-F]{1,4}:){3}((:[da-fA-F]{1,4}){1,3}|:)$|^([da-fA-F]{1,4}:){4}((:[da-fA-F]{1,4}){1,2}|:)$|^([da-fA-F]{1,4}:){5}:([da-fA-F]{1,4})?$|^([da-fA-F]{1,4}:){6}:$
IPV4 + mask
^((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?)(/(d|[1-2]d|3[0-2]))?$
IPV6 + mask
^([da-fA-F]{1,4}:){6}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?)(/([1-9]?d|(1([0-1]d|2[0-8]))))?$|^::([da-fA-F]{1,4}:){0,4}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?)(/([1-9]?d|(1([0-1]d|2[0-8]))))?$|^([da-fA-F]{1,4}:):([da-fA-F]{1,4}:){0,3}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?)(/([1-9]?d|(1([0-1]d|2[0-8]))))?$|^([da-fA-F]{1,4}:){2}:([da-fA-F]{1,4}:){0,2}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?)(/([1-9]?d|(1([0-1]d|2[0-8]))))?$|^([da-fA-F]{1,4}:){3}:([da-fA-F]{1,4}:){0,1}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?)(/([1-9]?d|(1([0-1]d|2[0-8]))))?$|^([da-fA-F]{1,4}:){4}:((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?)(/([1-9]?d|(1([0-1]d|2[0-8]))))?$|^([da-fA-F]{1,4}:){7}[da-fA-F]{1,4}(/([1-9]?d|(1([0-1]d|2[0-8]))))?$|^:((:[da-fA-F]{1,4}){1,6}|:)(/([1-9]?d|(1([0-1]d|2[0-8]))))?$|^[da-fA-F]{1,4}:((:[da-fA-F]{1,4}){1,5}|:)(/([1-9]?d|(1([0-1]d|2[0-8]))))?$|^([da-fA-F]{1,4}:){2}((:[da-fA-F]{1,4}){1,4}|:)(/([1-9]?d|(1([0-1]d|2[0-8]))))?$|^([da-fA-F]{1,4}:){3}((:[da-fA-F]{1,4}){1,3}|:)(/([1-9]?d|(1([0-1]d|2[0-8]))))?$|^([da-fA-F]{1,4}:){4}((:[da-fA-F]{1,4}){1,2}|:)(/([1-9]?d|(1([0-1]d|2[0-8]))))?$|^([da-fA-F]{1,4}:){5}:([da-fA-F]{1,4})?(/([1-9]?d|(1([0-1]d|2[0-8]))))?$|^([da-fA-F]{1,4}:){6}:(/([1-9]?d|(1([0-1]d|2[0-8]))))?$
IPV4/IPV6 + mask
^((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?)(/(d|[1-2]d|3[0-2]))?$|^([da-fA-F]{1,4}:){6}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?)(/([1-9]?d|(1([0-1]d|2[0-8]))))?$|^::([da-fA-F]{1,4}:){0,4}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?)(/([1-9]?d|(1([0-1]d|2[0-8]))))?$|^([da-fA-F]{1,4}:):([da-fA-F]{1,4}:){0,3}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?)(/([1-9]?d|(1([0-1]d|2[0-8]))))?$|^([da-fA-F]{1,4}:){2}:([da-fA-F]{1,4}:){0,2}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?)(/([1-9]?d|(1([0-1]d|2[0-8]))))?$|^([da-fA-F]{1,4}:){3}:([da-fA-F]{1,4}:){0,1}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?)(/([1-9]?d|(1([0-1]d|2[0-8]))))?$|^([da-fA-F]{1,4}:){4}:((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?)(/([1-9]?d|(1([0-1]d|2[0-8]))))?$|^([da-fA-F]{1,4}:){7}[da-fA-F]{1,4}(/([1-9]?d|(1([0-1]d|2[0-8]))))?$|^:((:[da-fA-F]{1,4}){1,6}|:)(/([1-9]?d|(1([0-1]d|2[0-8]))))?$|^[da-fA-F]{1,4}:((:[da-fA-F]{1,4}){1,5}|:)(/([1-9]?d|(1([0-1]d|2[0-8]))))?$|^([da-fA-F]{1,4}:){2}((:[da-fA-F]{1,4}){1,4}|:)(/([1-9]?d|(1([0-1]d|2[0-8]))))?$|^([da-fA-F]{1,4}:){3}((:[da-fA-F]{1,4}){1,3}|:)(/([1-9]?d|(1([0-1]d|2[0-8]))))?$|^([da-fA-F]{1,4}:){4}((:[da-fA-F]{1,4}){1,2}|:)(/([1-9]?d|(1([0-1]d|2[0-8]))))?$|^([da-fA-F]{1,4}:){5}:([da-fA-F]{1,4})?(/([1-9]?d|(1([0-1]d|2[0-8]))))?$|^([da-fA-F]{1,4}:){6}:(/([1-9]?d|(1([0-1]d|2[0-8]))))?$
IPV4-IPV4
^((((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?))-(((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?)))$
IPV6-IPV6
^(((([da-fA-F]{1,4}:){6}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?))|(::([da-fA-F]{1,4}:){0,4}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?))|(([da-fA-F]{1,4}:):([da-fA-F]{1,4}:){0,3}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?))|(([da-fA-F]{1,4}:){2}:([da-fA-F]{1,4}:){0,2}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?))|(([da-fA-F]{1,4}:){3}:([da-fA-F]{1,4}:){0,1}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?))|(([da-fA-F]{1,4}:){4}:((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?))|(([da-fA-F]{1,4}:){7}[da-fA-F]{1,4})|(:((:[da-fA-F]{1,4}){1,6}|:))|([da-fA-F]{1,4}:((:[da-fA-F]{1,4}){1,5}|:))|(([da-fA-F]{1,4}:){2}((:[da-fA-F]{1,4}){1,4}|:))|(([da-fA-F]{1,4}:){3}((:[da-fA-F]{1,4}){1,3}|:))|(([da-fA-F]{1,4}:){4}((:[da-fA-F]{1,4}){1,2}|:))|(([da-fA-F]{1,4}:){5}:([da-fA-F]{1,4})?)|(([da-fA-F]{1,4}:){6}:))-((([da-fA-F]{1,4}:){6}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?))|(::([da-fA-F]{1,4}:){0,4}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?))|(([da-fA-F]{1,4}:):([da-fA-F]{1,4}:){0,3}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?))|(([da-fA-F]{1,4}:){2}:([da-fA-F]{1,4}:){0,2}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?))|(([da-fA-F]{1,4}:){3}:([da-fA-F]{1,4}:){0,1}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?))|(([da-fA-F]{1,4}:){4}:((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?))|(([da-fA-F]{1,4}:){7}[da-fA-F]{1,4})|(:((:[da-fA-F]{1,4}){1,6}|:))|([da-fA-F]{1,4}:((:[da-fA-F]{1,4}){1,5}|:))|(([da-fA-F]{1,4}:){2}((:[da-fA-F]{1,4}){1,4}|:))|(([da-fA-F]{1,4}:){3}((:[da-fA-F]{1,4}){1,3}|:))|(([da-fA-F]{1,4}:){4}((:[da-fA-F]{1,4}){1,2}|:))|(([da-fA-F]{1,4}:){5}:([da-fA-F]{1,4})?)|(([da-fA-F]{1,4}:){6}:)))$
IPV4-IPV4 或 IPV6-IPV6
^(((((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?))-(((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?)))|(((([da-fA-F]{1,4}:){6}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?))|(::([da-fA-F]{1,4}:){0,4}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?))|(([da-fA-F]{1,4}:):([da-fA-F]{1,4}:){0,3}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?))|(([da-fA-F]{1,4}:){2}:([da-fA-F]{1,4}:){0,2}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?))|(([da-fA-F]{1,4}:){3}:([da-fA-F]{1,4}:){0,1}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?))|(([da-fA-F]{1,4}:){4}:((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?))|(([da-fA-F]{1,4}:){7}[da-fA-F]{1,4})|(:((:[da-fA-F]{1,4}){1,6}|:))|([da-fA-F]{1,4}:((:[da-fA-F]{1,4}){1,5}|:))|(([da-fA-F]{1,4}:){2}((:[da-fA-F]{1,4}){1,4}|:))|(([da-fA-F]{1,4}:){3}((:[da-fA-F]{1,4}){1,3}|:))|(([da-fA-F]{1,4}:){4}((:[da-fA-F]{1,4}){1,2}|:))|(([da-fA-F]{1,4}:){5}:([da-fA-F]{1,4})?)|(([da-fA-F]{1,4}:){6}:))-((([da-fA-F]{1,4}:){6}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?))|(::([da-fA-F]{1,4}:){0,4}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?))|(([da-fA-F]{1,4}:):([da-fA-F]{1,4}:){0,3}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?))|(([da-fA-F]{1,4}:){2}:([da-fA-F]{1,4}:){0,2}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?))|(([da-fA-F]{1,4}:){3}:([da-fA-F]{1,4}:){0,1}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?))|(([da-fA-F]{1,4}:){4}:((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?))|(([da-fA-F]{1,4}:){7}[da-fA-F]{1,4})|(:((:[da-fA-F]{1,4}){1,6}|:))|([da-fA-F]{1,4}:((:[da-fA-F]{1,4}){1,5}|:))|(([da-fA-F]{1,4}:){2}((:[da-fA-F]{1,4}){1,4}|:))|(([da-fA-F]{1,4}:){3}((:[da-fA-F]{1,4}){1,3}|:))|(([da-fA-F]{1,4}:){4}((:[da-fA-F]{1,4}){1,2}|:))|(([da-fA-F]{1,4}:){5}:([da-fA-F]{1,4})?)|(([da-fA-F]{1,4}:){6}:))))$
IPV4-IPV4 或 IPV6-IPV6 或 IPV6 + mask 或 IPV4 + mask
^(((((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?))-(((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?)))|(((([da-fA-F]{1,4}:){6}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?))|(::([da-fA-F]{1,4}:){0,4}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?))|(([da-fA-F]{1,4}:):([da-fA-F]{1,4}:){0,3}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?))|(([da-fA-F]{1,4}:){2}:([da-fA-F]{1,4}:){0,2}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?))|(([da-fA-F]{1,4}:){3}:([da-fA-F]{1,4}:){0,1}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?))|(([da-fA-F]{1,4}:){4}:((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?))|(([da-fA-F]{1,4}:){7}[da-fA-F]{1,4})|(:((:[da-fA-F]{1,4}){1,6}|:))|([da-fA-F]{1,4}:((:[da-fA-F]{1,4}){1,5}|:))|(([da-fA-F]{1,4}:){2}((:[da-fA-F]{1,4}){1,4}|:))|(([da-fA-F]{1,4}:){3}((:[da-fA-F]{1,4}){1,3}|:))|(([da-fA-F]{1,4}:){4}((:[da-fA-F]{1,4}){1,2}|:))|(([da-fA-F]{1,4}:){5}:([da-fA-F]{1,4})?)|(([da-fA-F]{1,4}:){6}:))-((([da-fA-F]{1,4}:){6}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?))|(::([da-fA-F]{1,4}:){0,4}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?))|(([da-fA-F]{1,4}:):([da-fA-F]{1,4}:){0,3}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?))|(([da-fA-F]{1,4}:){2}:([da-fA-F]{1,4}:){0,2}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?))|(([da-fA-F]{1,4}:){3}:([da-fA-F]{1,4}:){0,1}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?))|(([da-fA-F]{1,4}:){4}:((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?))|(([da-fA-F]{1,4}:){7}[da-fA-F]{1,4})|(:((:[da-fA-F]{1,4}){1,6}|:))|([da-fA-F]{1,4}:((:[da-fA-F]{1,4}){1,5}|:))|(([da-fA-F]{1,4}:){2}((:[da-fA-F]{1,4}){1,4}|:))|(([da-fA-F]{1,4}:){3}((:[da-fA-F]{1,4}){1,3}|:))|(([da-fA-F]{1,4}:){4}((:[da-fA-F]{1,4}){1,2}|:))|(([da-fA-F]{1,4}:){5}:([da-fA-F]{1,4})?)|(([da-fA-F]{1,4}:){6}:)))|(((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?)(/(d|[1-2]d|3[0-2]))?)|((([da-fA-F]{1,4}:){6}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?)(/([1-9]?d|(1([0-1]d|2[0-8]))))?)|(::([da-fA-F]{1,4}:){0,4}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?)(/([1-9]?d|(1([0-1]d|2[0-8]))))?)|(([da-fA-F]{1,4}:):([da-fA-F]{1,4}:){0,3}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?)(/([1-9]?d|(1([0-1]d|2[0-8]))))?)|(([da-fA-F]{1,4}:){2}:([da-fA-F]{1,4}:){0,2}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?)(/([1-9]?d|(1([0-1]d|2[0-8]))))?)|(([da-fA-F]{1,4}:){3}:([da-fA-F]{1,4}:){0,1}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?)(/([1-9]?d|(1([0-1]d|2[0-8]))))?)|(([da-fA-F]{1,4}:){4}:((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?)(/([1-9]?d|(1([0-1]d|2[0-8]))))?)|(([da-fA-F]{1,4}:){7}[da-fA-F]{1,4}(/([1-9]?d|(1([0-1]d|2[0-8]))))?)|(:((:[da-fA-F]{1,4}){1,6}|:)(/([1-9]?d|(1([0-1]d|2[0-8]))))?)|([da-fA-F]{1,4}:((:[da-fA-F]{1,4}){1,5}|:)(/([1-9]?d|(1([0-1]d|2[0-8]))))?)|(([da-fA-F]{1,4}:){2}((:[da-fA-F]{1,4}){1,4}|:)(/([1-9]?d|(1([0-1]d|2[0-8]))))?)|(([da-fA-F]{1,4}:){3}((:[da-fA-F]{1,4}){1,3}|:)(/([1-9]?d|(1([0-1]d|2[0-8]))))?)|(([da-fA-F]{1,4}:){4}((:[da-fA-F]{1,4}){1,2}|:)(/([1-9]?d|(1([0-1]d|2[0-8]))))?)|(([da-fA-F]{1,4}:){5}:([da-fA-F]{1,4})?(/([1-9]?d|(1([0-1]d|2[0-8]))))?)|(([da-fA-F]{1,4}:){6}:(/([1-9]?d|(1([0-1]d|2[0-8]))))?)))$
多行匹配
上面给出的都是单行正则匹配
单行:
^a$|^b$
等价于:
^((a)|(b))$
多行正则匹配为
^(((a)|(b))[ ])*((a)|(b))$
多行 IPV4/IPV6 + mask
^(((((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?)(/(d|[1-2]d|3[0-2]))?)|(([da-fA-F]{1,4}:){6}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?)(/([1-9]?d|(1([0-1]d|2[0-8]))))?)|(::([da-fA-F]{1,4}:){0,4}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?)(/([1-9]?d|(1([0-1]d|2[0-8]))))?)|(([da-fA-F]{1,4}:):([da-fA-F]{1,4}:){0,3}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?)(/([1-9]?d|(1([0-1]d|2[0-8]))))?)|(([da-fA-F]{1,4}:){2}:([da-fA-F]{1,4}:){0,2}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?)(/([1-9]?d|(1([0-1]d|2[0-8]))))?)|(([da-fA-F]{1,4}:){3}:([da-fA-F]{1,4}:){0,1}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?)(/([1-9]?d|(1([0-1]d|2[0-8]))))?)|(([da-fA-F]{1,4}:){4}:((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?)(/([1-9]?d|(1([0-1]d|2[0-8]))))?)|(([da-fA-F]{1,4}:){7}[da-fA-F]{1,4}(/([1-9]?d|(1([0-1]d|2[0-8]))))?)|(:((:[da-fA-F]{1,4}){1,6}|:)(/([1-9]?d|(1([0-1]d|2[0-8]))))?)|([da-fA-F]{1,4}:((:[da-fA-F]{1,4}){1,5}|:)(/([1-9]?d|(1([0-1]d|2[0-8]))))?)|(([da-fA-F]{1,4}:){2}((:[da-fA-F]{1,4}){1,4}|:)(/([1-9]?d|(1([0-1]d|2[0-8]))))?)|(([da-fA-F]{1,4}:){3}((:[da-fA-F]{1,4}){1,3}|:)(/([1-9]?d|(1([0-1]d|2[0-8]))))?)|(([da-fA-F]{1,4}:){4}((:[da-fA-F]{1,4}){1,2}|:)(/([1-9]?d|(1([0-1]d|2[0-8]))))?)|(([da-fA-F]{1,4}:){5}:([da-fA-F]{1,4})?(/([1-9]?d|(1([0-1]d|2[0-8]))))?)|(([da-fA-F]{1,4}:){6}:(/([1-9]?d|(1([0-1]d|2[0-8]))))?))[ ])*((((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?)(/(d|[1-2]d|3[0-2]))?)|(([da-fA-F]{1,4}:){6}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?)(/([1-9]?d|(1([0-1]d|2[0-8]))))?)|(::([da-fA-F]{1,4}:){0,4}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?)(/([1-9]?d|(1([0-1]d|2[0-8]))))?)|(([da-fA-F]{1,4}:):([da-fA-F]{1,4}:){0,3}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?)(/([1-9]?d|(1([0-1]d|2[0-8]))))?)|(([da-fA-F]{1,4}:){2}:([da-fA-F]{1,4}:){0,2}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?)(/([1-9]?d|(1([0-1]d|2[0-8]))))?)|(([da-fA-F]{1,4}:){3}:([da-fA-F]{1,4}:){0,1}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?)(/([1-9]?d|(1([0-1]d|2[0-8]))))?)|(([da-fA-F]{1,4}:){4}:((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?)(/([1-9]?d|(1([0-1]d|2[0-8]))))?)|(([da-fA-F]{1,4}:){7}[da-fA-F]{1,4}(/([1-9]?d|(1([0-1]d|2[0-8]))))?)|(:((:[da-fA-F]{1,4}){1,6}|:)(/([1-9]?d|(1([0-1]d|2[0-8]))))?)|([da-fA-F]{1,4}:((:[da-fA-F]{1,4}){1,5}|:)(/([1-9]?d|(1([0-1]d|2[0-8]))))?)|(([da-fA-F]{1,4}:){2}((:[da-fA-F]{1,4}){1,4}|:)(/([1-9]?d|(1([0-1]d|2[0-8]))))?)|(([da-fA-F]{1,4}:){3}((:[da-fA-F]{1,4}){1,3}|:)(/([1-9]?d|(1([0-1]d|2[0-8]))))?)|(([da-fA-F]{1,4}:){4}((:[da-fA-F]{1,4}){1,2}|:)(/([1-9]?d|(1([0-1]d|2[0-8]))))?)|(([da-fA-F]{1,4}:){5}:([da-fA-F]{1,4})?(/([1-9]?d|(1([0-1]d|2[0-8]))))?)|(([da-fA-F]{1,4}:){6}:(/([1-9]?d|(1([0-1]d|2[0-8]))))?))$
以上正则表达式,就可匹配下面的 IP 组合
1.1.1.1 ::1 2.2.2.2/24 1::/16
多行 IPV4/IPV6 不带子网前缀
^(((((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?))|(([da-fA-F]{1,4}:){6}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?))|(::([da-fA-F]{1,4}:){0,4}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?))|(([da-fA-F]{1,4}:):([da-fA-F]{1,4}:){0,3}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?))|(([da-fA-F]{1,4}:){2}:([da-fA-F]{1,4}:){0,2}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?))|(([da-fA-F]{1,4}:){3}:([da-fA-F]{1,4}:){0,1}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?))|(([da-fA-F]{1,4}:){4}:((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?))|(([da-fA-F]{1,4}:){7}[da-fA-F]{1,4})|(:((:[da-fA-F]{1,4}){1,6}|:))|([da-fA-F]{1,4}:((:[da-fA-F]{1,4}){1,5}|:))|(([da-fA-F]{1,4}:){2}((:[da-fA-F]{1,4}){1,4}|:))|(([da-fA-F]{1,4}:){3}((:[da-fA-F]{1,4}){1,3}|:))|(([da-fA-F]{1,4}:){4}((:[da-fA-F]{1,4}){1,2}|:))|(([da-fA-F]{1,4}:){5}:([da-fA-F]{1,4})?)|(([da-fA-F]{1,4}:){6}:))[ ])*((((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?))|(([da-fA-F]{1,4}:){6}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?))|(::([da-fA-F]{1,4}:){0,4}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?))|(([da-fA-F]{1,4}:):([da-fA-F]{1,4}:){0,3}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?))|(([da-fA-F]{1,4}:){2}:([da-fA-F]{1,4}:){0,2}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?))|(([da-fA-F]{1,4}:){3}:([da-fA-F]{1,4}:){0,1}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?))|(([da-fA-F]{1,4}:){4}:((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?))|(([da-fA-F]{1,4}:){7}[da-fA-F]{1,4})|(:((:[da-fA-F]{1,4}){1,6}|:))|([da-fA-F]{1,4}:((:[da-fA-F]{1,4}){1,5}|:))|(([da-fA-F]{1,4}:){2}((:[da-fA-F]{1,4}){1,4}|:))|(([da-fA-F]{1,4}:){3}((:[da-fA-F]{1,4}){1,3}|:))|(([da-fA-F]{1,4}:){4}((:[da-fA-F]{1,4}){1,2}|:))|(([da-fA-F]{1,4}:){5}:([da-fA-F]{1,4})?)|(([da-fA-F]{1,4}:){6}:))$
多行 IPV4-IPV4 或 IPV6-IPV6 或 IPV6 + mask 或 IPV4 + mask
^((((((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?))-(((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?)))|(((([da-fA-F]{1,4}:){6}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?))|(::([da-fA-F]{1,4}:){0,4}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?))|(([da-fA-F]{1,4}:):([da-fA-F]{1,4}:){0,3}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?))|(([da-fA-F]{1,4}:){2}:([da-fA-F]{1,4}:){0,2}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?))|(([da-fA-F]{1,4}:){3}:([da-fA-F]{1,4}:){0,1}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?))|(([da-fA-F]{1,4}:){4}:((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?))|(([da-fA-F]{1,4}:){7}[da-fA-F]{1,4})|(:((:[da-fA-F]{1,4}){1,6}|:))|([da-fA-F]{1,4}:((:[da-fA-F]{1,4}){1,5}|:))|(([da-fA-F]{1,4}:){2}((:[da-fA-F]{1,4}){1,4}|:))|(([da-fA-F]{1,4}:){3}((:[da-fA-F]{1,4}){1,3}|:))|(([da-fA-F]{1,4}:){4}((:[da-fA-F]{1,4}){1,2}|:))|(([da-fA-F]{1,4}:){5}:([da-fA-F]{1,4})?)|(([da-fA-F]{1,4}:){6}:))-((([da-fA-F]{1,4}:){6}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?))|(::([da-fA-F]{1,4}:){0,4}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?))|(([da-fA-F]{1,4}:):([da-fA-F]{1,4}:){0,3}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?))|(([da-fA-F]{1,4}:){2}:([da-fA-F]{1,4}:){0,2}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?))|(([da-fA-F]{1,4}:){3}:([da-fA-F]{1,4}:){0,1}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?))|(([da-fA-F]{1,4}:){4}:((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?))|(([da-fA-F]{1,4}:){7}[da-fA-F]{1,4})|(:((:[da-fA-F]{1,4}){1,6}|:))|([da-fA-F]{1,4}:((:[da-fA-F]{1,4}){1,5}|:))|(([da-fA-F]{1,4}:){2}((:[da-fA-F]{1,4}){1,4}|:))|(([da-fA-F]{1,4}:){3}((:[da-fA-F]{1,4}){1,3}|:))|(([da-fA-F]{1,4}:){4}((:[da-fA-F]{1,4}){1,2}|:))|(([da-fA-F]{1,4}:){5}:([da-fA-F]{1,4})?)|(([da-fA-F]{1,4}:){6}:)))|(((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?)(/(d|[1-2]d|3[0-2]))?)|((([da-fA-F]{1,4}:){6}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?)(/([1-9]?d|(1([0-1]d|2[0-8]))))?)|(::([da-fA-F]{1,4}:){0,4}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?)(/([1-9]?d|(1([0-1]d|2[0-8]))))?)|(([da-fA-F]{1,4}:):([da-fA-F]{1,4}:){0,3}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?)(/([1-9]?d|(1([0-1]d|2[0-8]))))?)|(([da-fA-F]{1,4}:){2}:([da-fA-F]{1,4}:){0,2}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?)(/([1-9]?d|(1([0-1]d|2[0-8]))))?)|(([da-fA-F]{1,4}:){3}:([da-fA-F]{1,4}:){0,1}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?)(/([1-9]?d|(1([0-1]d|2[0-8]))))?)|(([da-fA-F]{1,4}:){4}:((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?)(/([1-9]?d|(1([0-1]d|2[0-8]))))?)|(([da-fA-F]{1,4}:){7}[da-fA-F]{1,4}(/([1-9]?d|(1([0-1]d|2[0-8]))))?)|(:((:[da-fA-F]{1,4}){1,6}|:)(/([1-9]?d|(1([0-1]d|2[0-8]))))?)|([da-fA-F]{1,4}:((:[da-fA-F]{1,4}){1,5}|:)(/([1-9]?d|(1([0-1]d|2[0-8]))))?)|(([da-fA-F]{1,4}:){2}((:[da-fA-F]{1,4}){1,4}|:)(/([1-9]?d|(1([0-1]d|2[0-8]))))?)|(([da-fA-F]{1,4}:){3}((:[da-fA-F]{1,4}){1,3}|:)(/([1-9]?d|(1([0-1]d|2[0-8]))))?)|(([da-fA-F]{1,4}:){4}((:[da-fA-F]{1,4}){1,2}|:)(/([1-9]?d|(1([0-1]d|2[0-8]))))?)|(([da-fA-F]{1,4}:){5}:([da-fA-F]{1,4})?(/([1-9]?d|(1([0-1]d|2[0-8]))))?)|(([da-fA-F]{1,4}:){6}:(/([1-9]?d|(1([0-1]d|2[0-8]))))?)))[ ])*(((((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?))-(((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?)))|(((([da-fA-F]{1,4}:){6}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?))|(::([da-fA-F]{1,4}:){0,4}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?))|(([da-fA-F]{1,4}:):([da-fA-F]{1,4}:){0,3}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?))|(([da-fA-F]{1,4}:){2}:([da-fA-F]{1,4}:){0,2}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?))|(([da-fA-F]{1,4}:){3}:([da-fA-F]{1,4}:){0,1}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?))|(([da-fA-F]{1,4}:){4}:((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?))|(([da-fA-F]{1,4}:){7}[da-fA-F]{1,4})|(:((:[da-fA-F]{1,4}){1,6}|:))|([da-fA-F]{1,4}:((:[da-fA-F]{1,4}){1,5}|:))|(([da-fA-F]{1,4}:){2}((:[da-fA-F]{1,4}){1,4}|:))|(([da-fA-F]{1,4}:){3}((:[da-fA-F]{1,4}){1,3}|:))|(([da-fA-F]{1,4}:){4}((:[da-fA-F]{1,4}){1,2}|:))|(([da-fA-F]{1,4}:){5}:([da-fA-F]{1,4})?)|(([da-fA-F]{1,4}:){6}:))-((([da-fA-F]{1,4}:){6}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?))|(::([da-fA-F]{1,4}:){0,4}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?))|(([da-fA-F]{1,4}:):([da-fA-F]{1,4}:){0,3}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?))|(([da-fA-F]{1,4}:){2}:([da-fA-F]{1,4}:){0,2}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?))|(([da-fA-F]{1,4}:){3}:([da-fA-F]{1,4}:){0,1}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?))|(([da-fA-F]{1,4}:){4}:((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?))|(([da-fA-F]{1,4}:){7}[da-fA-F]{1,4})|(:((:[da-fA-F]{1,4}){1,6}|:))|([da-fA-F]{1,4}:((:[da-fA-F]{1,4}){1,5}|:))|(([da-fA-F]{1,4}:){2}((:[da-fA-F]{1,4}){1,4}|:))|(([da-fA-F]{1,4}:){3}((:[da-fA-F]{1,4}){1,3}|:))|(([da-fA-F]{1,4}:){4}((:[da-fA-F]{1,4}){1,2}|:))|(([da-fA-F]{1,4}:){5}:([da-fA-F]{1,4})?)|(([da-fA-F]{1,4}:){6}:)))|(((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?)(/(d|[1-2]d|3[0-2]))?)|((([da-fA-F]{1,4}:){6}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?)(/([1-9]?d|(1([0-1]d|2[0-8]))))?)|(::([da-fA-F]{1,4}:){0,4}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?)(/([1-9]?d|(1([0-1]d|2[0-8]))))?)|(([da-fA-F]{1,4}:):([da-fA-F]{1,4}:){0,3}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?)(/([1-9]?d|(1([0-1]d|2[0-8]))))?)|(([da-fA-F]{1,4}:){2}:([da-fA-F]{1,4}:){0,2}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?)(/([1-9]?d|(1([0-1]d|2[0-8]))))?)|(([da-fA-F]{1,4}:){3}:([da-fA-F]{1,4}:){0,1}((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?)(/([1-9]?d|(1([0-1]d|2[0-8]))))?)|(([da-fA-F]{1,4}:){4}:((25[0-5]|2[0-4]d|[01]?dd?).){3}(25[0-5]|2[0-4]d|[01]?dd?)(/([1-9]?d|(1([0-1]d|2[0-8]))))?)|(([da-fA-F]{1,4}:){7}[da-fA-F]{1,4}(/([1-9]?d|(1([0-1]d|2[0-8]))))?)|(:((:[da-fA-F]{1,4}){1,6}|:)(/([1-9]?d|(1([0-1]d|2[0-8]))))?)|([da-fA-F]{1,4}:((:[da-fA-F]{1,4}){1,5}|:)(/([1-9]?d|(1([0-1]d|2[0-8]))))?)|(([da-fA-F]{1,4}:){2}((:[da-fA-F]{1,4}){1,4}|:)(/([1-9]?d|(1([0-1]d|2[0-8]))))?)|(([da-fA-F]{1,4}:){3}((:[da-fA-F]{1,4}){1,3}|:)(/([1-9]?d|(1([0-1]d|2[0-8]))))?)|(([da-fA-F]{1,4}:){4}((:[da-fA-F]{1,4}){1,2}|:)(/([1-9]?d|(1([0-1]d|2[0-8]))))?)|(([da-fA-F]{1,4}:){5}:([da-fA-F]{1,4})?(/([1-9]?d|(1([0-1]d|2[0-8]))))?)|(([da-fA-F]{1,4}:){6}:(/([1-9]?d|(1([0-1]d|2[0-8]))))?)))$
用了以上正则表达式,就可匹配下面的 IP 组合
1.1.1.1 1.1.1.2-1.1.1.3 1.1.2.0/24 ::1 ::2-1:: 2::/64