Hi Guys,
So if I have two fields with really random set of text, no similarities except the red text. Does have the 'red' fonts in similarity as below.
In this case, is there a way to search to say when first four letters in FieldA exists in FieldB, exclude?
This would be very easy in powershell or python. I am medium splunk user as well, but not sure how I'd do this in splunk.
This would be very helpful.. Your help is appreciated in advance.
FieldA | FieldB |
Complete | Exch.Complete |
NotComplete | apps.NotC@ |
Satisftesting | Satiapps |
Both methods do work - Thanks RichGalloway and Bowesmana
If your problem is resolved, then please click the "Accept as Solution" button to help future readers.
See if this helps.
| eval exclString=substr(FieldA, 1, 4)
| where NOT match(FieldB, exclString)
EDIT: I fixed this answer to exclude rather than include matches. Thanks, @bowesmana !
Or the minimalist one liner 😃 - but turning round the logic to exclude rather than include those matching items
| where !match(FieldB, substr(FieldA, 1, 4))