Hey everyone. So what I need to do is complete the filename in one of my fields in an event. Example is this:
attachment = Filename ABC - 2019 111 CT.pdf
I am using the command: **| rex mode=sed field=attachment "s/ /_/g"** to replace the whitespace with underscores.
Question: How do I go about ignoring the whitespace before and after the dash. I am getting **Filename_ABC_- _2019_111_CT.pdf** when it needs to be **Filename_ABC-2019_111_CT.pdf**
Any help would be great. Thank you!
↧