Created
March 1, 2019 17:36
-
-
Save tuckner/212c6133dfa4948348bf50b11fe451cf to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import re | |
s = 'eventdataxml' | |
l = re.findall('(?<=Name=")\w+', s) | |
p = '' | |
for i in l: | |
p += "'Data Name=\"{0}\">' {0} '<' * ".format(i) | |
full = """ | |
Event | |
| where EventID == \"1\" | |
| parse EventData with * {0} | |
| search \"*\" | |
""".format(p) | |
print(full) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment