Using a RegEx to match IP addresses in Python

后端 未结 13 2470
不思量自难忘°
不思量自难忘° 2020-12-01 04:58

I\'m trying to make a test for checking whether a sys.argv input matches the RegEx for an IP address...

As a simple test, I have the following...

imp         


        
13条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-01 05:19

    You are trying to use . as a . not as the wildcard for any character. Use \. instead to indicate a period.

提交回复
热议问题