I am trying to set a field to the value of a string without the last 2 digits. For example:
Hotel=297654 from 29765423
Hotel=36345 from 3624502
I tried rtrim but docs say you must know the exact string you're removing, mine are different every time. I also tried substr but the length is not constant from 1st character and using -2 like substr(Field, -2) returns the last 2 characters...the part I want to throw away.
Was trying something like rtrim(Field,substr(Field,-2) but can't get that to work.
Suggestions? - THANKS
This may do it:
<your_search_here> | eval myfield = substr(myfield, 1, len(myfield)-2)
d.
-
please upvote if you find this answer useful
This may do it:
<your_search_here> | eval myfield = substr(myfield, 1, len(myfield)-2)
d.
-
please upvote if you find this answer useful