contact
support
Download
order
news
AGG Software Forums
December 03, 2024, 07:56:17 PM
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
: Welcome on our forum!
Home
Help
Search
Login
Register
AGG Software Forums
>
Online Help Center
>
Data loggers and plug-ins
>
leading zeros
Pages: [
1
]
« previous
next »
Print
Author
Topic: leading zeros (Read 21775 times)
dafrenchman
Jr. Member
Karma: +0/-0
Posts: 15
leading zeros
«
on:
August 12, 2020, 07:44:59 PM »
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,
Logged
Arthur Grasin
Tech. Support
Administrator
Hero Member
Karma: +0/-0
Posts: 806
Re: leading zeros
«
Reply #1 on:
August 13, 2020, 07:20:03 AM »
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.
Logged
dafrenchman
Jr. Member
Karma: +0/-0
Posts: 15
Re: leading zeros
«
Reply #2 on:
August 21, 2020, 03:46:27 PM »
Allo,
Below are 2 data packets. with desired results.
First sample
?
880698-00-2
061
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-190031
061
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.
«
Last Edit: August 21, 2020, 04:13:00 PM by dafrenchman
»
Logged
Arthur Grasin
Tech. Support
Administrator
Hero Member
Karma: +0/-0
Posts: 806
Re: leading zeros
«
Reply #3 on:
August 22, 2020, 09:16:33 AM »
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+)\@
Logged
dafrenchman
Jr. Member
Karma: +0/-0
Posts: 15
Re: leading zeros
«
Reply #4 on:
August 24, 2020, 06:03:41 PM »
Thank you.
Just to make sure I understand.
This would be used in the expressions plugin?
CB
Logged
Arthur Grasin
Tech. Support
Administrator
Hero Member
Karma: +0/-0
Posts: 806
Re: leading zeros
«
Reply #5 on:
August 25, 2020, 06:45:16 AM »
You should use it in the ASCII Data Parser plugin.
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
News & Feedbacks
-----------------------------
=> News and Updates
=> Site Comments
-----------------------------
Online Help Center
-----------------------------
=> Advanced Serial Port Monitor
=> Data loggers and plug-ins
=> Data loggers ActiveX
=> Advanced USB Port Monitor
=> Virtual Null Modem
=> Software for DNC and CNC
=> Other questions
-----------------------------
Development
-----------------------------
=> Feature Requests
Loading...