Regular Expression to match IP address + wildcard

后端 未结 5 898
旧时难觅i
旧时难觅i 2021-01-02 21:57

I\'m trying to use a RegularexpressionValidator to match an IP address (with possible wildcards) for an IP filtering system.

I\'m using the following Regex:

5条回答
  •  耶瑟儿~
    2021-01-02 22:23

    asp:RegularExpressionValidator does not require you to double-escape backslashes. You should try:

    ([0-9]{1,3}\.|\*\.){3}([0-9]{1,3}|\*){1}

提交回复
热议问题