I have a string with certain formate
154787878_2582_test.txt.zip
I need to remove everything before first occurrence of - and remove 154787878_
I have tried
| eval txtFile=replace(mvindex(split(txtFile,"_"),0),"")
Please help
I have a string with certain formate
154787878_2582_test.txt.zip
I need to remove everything before first occurrence of - and remove 154787878_
I have tried
| eval txtFile=replace(mvindex(split(txtFile,"_"),0),"")
Please help
You may use
| eval txtFile = replace(txtFile,"^[^_]*_", "")
See the regex demo
The regex matches
^ - start of string[^_]* - 0 or more chars other than __ - an underscore.