Created
October 4, 2017 02:24
-
-
Save lae/b2d6662fc722a554d7842366d7c33f49 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>> h = re.search('^(127\.0\.0\.1 (?!hello\.local hello( pvelocalhost)?$)|(?!127\.0\.0\.1)[\w.]*\b(hello\.local|hello)\b.*)', "127.2.0.1 hello.local") | |
>>> h | |
>>> h = re.search('^(127\.0\.0\.1 (?!hello\.local hello( pvelocalhost)?$)|(?!127\.0\.0\.1)[\w.]*\s+(hello\.local|hello)\b.*)', "127.2.0.1 hello.local") | |
>>> h | |
>>> h = re.search('^(127\.0\.0\.1 (?!hello\.local hello( pvelocalhost)?$)|(?!127\.0\.0\.1)[\w.]*\b(hello\.local|hello)(\s*|\s+.*))', "127.2.0.1 hello.local") | |
>>> h | |
>>> h = re.search('^(127\.0\.0\.1 (?!hello\.local hello( pvelocalhost)?$)|(?!127\.0\.0\.1)[\w.]*\s+(hello\.local|hello)(\s*|\s+.*))', "127.2.0.1 hello.local") | |
>>> h | |
<_sre.SRE_Match object at 0x7fbe68e30c00> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment