I am attempting to extract attachment fields from our email logs using regex. Attachments like .jpg, .png, pdf, etc. I have gone through the process of using the SPL field extracting feature however it usually results in only one attachment type being selected or another, if I try and select other attachment types the extraction fails. Any suggestions would be greatly appreciated. Thank you.
Hi @treven,
maybe this regex could work for you:
| rex "(?<file>\w+\.(jpg|pdf|png))"
that you can test at https://regex101.com/r/ol040L/1
Ciao.
Giuseppe
That did it! Thank you very much for your assistance with this!
Hi @treven,
maybe this regex could work for you:
| rex "(?<file>\w+\.(jpg|pdf|png))"
that you can test at https://regex101.com/r/ol040L/1
Ciao.
Giuseppe
Yeah absolutely, I will post it soon. Thanks for your assistance.
Hi @treven,
I suppose that you're speaking to extract the file name of the attachment, not the attachment file itself!
Anyway, the field extraction should already be present in the Add-On you're using, if not, please share a sample of your logs, highlighting in bold the data to extract.
Ciao.
Giuseppe
Yes that is correct I am just looking to monitor the various types of attachment types. As I stated in my post, the field extracting feature is only allowing one type of attachment. It will only extract .jpg fields and will ignore pdf or png. If I try to add another by selecting it in an event, I will get an error.
Hi @treven,
ok, could you share a sample (in text format) of your logs (eventually masking data)?
Ciao.
Giuseppe