I have field DivionsID with data of Exe.123, how to trim this to just 123 ?
If you want to overwrite the field it should work;
| rex field = DivisionId "(?<DivisionId>\d+)"
ideally regex should work if not you could try the replace command something like below
|makeresults |eval data="Exe.123" |replace "Exe.123" with "123" |table data
I didn't get you, please elaborate
HI Suman
you wanted to trim the data Exe.123 to 123 right so you can either use regex like others or specifying or use the replace command
it would be great if could share the more about the data and what command are you executing with regex
its not helping when you say its not working or please elaborate
why create a new field div_no?
| rex filed = DivisionId " (?<DivisionId>\d+)" wouldn’t work?
Hi @sumandevops,
You can use rex command, below will output a new field div_no.
| rex field=DivionsID "(?<div_no>\d+)"
this is not working mate