Allo,
Is there a way to remove leading zeros in a parsed string item?
I think maybe via expressions plugin?
Example
0088-190031 should become 88-190031
Thanks,
Hello,
Could you please show me your full data packet. It is possible, you may use a regular expression to extract data as you want.
Otherwise, you should use the "Script execute" plugin.
Allo,
Below are 2 data packets. with desired results.
First sample
?880698-00-2061 28103@
need to parse as
field 1 880698-00-2 (11 characters)
field 2 061 (3 characters)
field 3 28103 (up to 9 characters)
Second sample
?0088-190031061 28230@
need to parse as
field 1 88-190031 (9 characters with first leading 0 dropped)
field 2 061 (3 Characters)
field 3 28230 (up to 9 characters)
I hope this can be done.
Thanks.
Try the following:
Sart signature: ?
End signature: @
Parse full data packet: yes
The regular expression for the first variable:
\?0*([\d\-]+)\d{3}\ {3}
The regular expression for the second variable:
(\d{3})\ {3}
The regular expression for the 3rd variable:
(\d+)\@
Thank you.
Just to make sure I understand.
This would be used in the expressions plugin?
CB
You should use it in the ASCII Data Parser plugin.