So, this is basically what I'm looking at:
Sep 18 22:12:48 hostname.domain %STRING-A:WD %SECSD-4-DS_S: A bunch of text that doesn't matter.
Sep 18 22:12:48 hostname.domain %STRONG-A:SD %LOSSD-3-DACS: A bunch of text that doesn't matter.
Sep 18 22:12:48 hostname.domain %STRANG-A:FD %SESDA-9-BSCS: A bunch of text that doesn't matter.
Sep 18 22:12:48 hostname.domain : hostname.domain %STRANG-A:FD %SESDA-9-BSCS: A bunch of text that doesn't matter.
As you can see the string I want to pull out is usually in position 5, the first one being SECSD-4-DS_S. However, sometimes it is in position 6. I want to pull it out of the string no matter the position. The string will always be some number of uppercase letters followed by a - (dash), followed by a digit, followed by another dash, and then some number of uppercase and non-alphanumeric characters.
Thanks.
... View more