I'm very new in developing regular expressions. Can any one help me to build a common regular expression for the following two strings.
- offset=0&fileGuid=1014fc48-6eb3-4fff-8242-96f5a496b0ee
- file=Arnold+P+Gleit+Contract+Information.pdf¶m=CommandType=1.1.2.1~ProjectID=13979~FolderID=1344972~UserID=13395&fileGuid=51c01e15-ac3c-4d2d-bdc9-4e63251a0364&location=CommandType=1.1.2.1~ProjectID=13979~FolderID=1344972~UserID=13395&size=28357151&title=&desc=&searchtags=&OnDuplicateAction=2&offset=1703936&first=True&last=False
My intention is to get the value of "offset" and "fileGuid" and load the data into a Hive table. I tried with the regular expression --
"input.regex" = "offset=([0-9]+).*\\&fileGuid=([a-zA-Z0-9]+\\-[a-zA-Z0-9]+\\-[a-zA-Z0-9]+\\-[a-zA-Z0-9]+\\-[a-zA-Z0-9]+)"
This will work for the first string but will fail for the 2nd string.
Thanks in Advance.