Try this
| makeresults
| eval test=0000123456000001200
| rex field="test" mode=sed "s/(^0*)//1"
Result: 123456000001200
If one of these answers has worked for you, please accept the answer, so that future viewers of this question can know that it has been answered for you, and which one worked for you.
Thanks!
if you convert the string to integer, it will get rid of the leading zeros
| makeresults
| eval String="00147"
| eval StringInt = tonumber(String)
| table String StringInt
Else if you want to keep it as a string, you can try using this regex
| makeresults
| eval String="00147"
|rex field=String "(?<Output>[^0+]\S+)"
| table String Output
Probably something like:
Printed\D+0*(\d+)
should work. \D+
is all non-digits, followed by zero or more 0
's, then it puts the other digits is the capture group.
You can use ltrim function
|makeresults| eval x="001727"|eval x= ltrim(tostring(x),"0")
The rex string I'd use:
Printed[\s:]+[0]*(?<your_field>[0-9]+)