Regular Expression to match IP address + wildcard

后端 未结 5 896
旧时难觅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:35

    How about putting start and end string characters on the expression

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

提交回复
热议问题