Skip to content

Instantly share code, notes, and snippets.

@dipanjanS
Created April 6, 2019 22:26
Show Gist options
  • Save dipanjanS/1cb4ed97eaefe6fafc2c3466c8c7076e to your computer and use it in GitHub Desktop.
Save dipanjanS/1cb4ed97eaefe6fafc2c3466c8c7076e to your computer and use it in GitHub Desktop.
method_uri_protocol_pattern = r'\"(\S+)\s(\S+)\s*(\S*)\"'
method_uri_protocol = [re.search(method_uri_protocol_pattern, item).groups()
if re.search(method_uri_protocol_pattern, item)
else 'no match'
for item in sample_logs]
method_uri_protocol
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment