I have a variable temp = 2019/19/09_04:02:49:344 and I want to remove all the special character from it like 20191909040249344
.
Rather than list every possible special character, another way is to exclude characters that are non-digits:
| makeresults
| eval temp="2019/19/09_04:02:49:344"
| rex mode=sed field=temp "s/[\D]+//g"
Rather than list every possible special character, another way is to exclude characters that are non-digits:
| makeresults
| eval temp="2019/19/09_04:02:49:344"
| rex mode=sed field=temp "s/[\D]+//g"
Hi,
If you want to remove special character during search time, you can try below search. In below example I am assuming that you have time in temp
field
<yourBaseSearch>
| rex mode=sed field=temp "s/[_!@#$%^&*(),.?\":{}|<>\/\\\\]//g"
Like every special character? So that you have 20191909040249344?
@xaratos yeah, every special character