ASCII serial data source doesnt recognize message
-
Hello everyone,
I´m using datasource ASCII serial to read the COM port and get a string from it.
My string is like this:
L1,3,5,0,5,80,40,31,0,0,0,0,512,412,213,900<LF>
I´ve made the datapoint REGEX to be on this syntax and tested it in some online regex testers (regexpal.com) :
[^;,]*
But when I turn on the datasource it displays a message of No Group 1.
I´ve set the stop mode with the LF caracter.
Anyone can give me an insight of what it may be occuring ?
-
You will need to setup a capture group using parenthesis. By default Capture group 0 is everything and capture group 1 is the first set of ( ). I would start by using this pattern (.*) to capture everything. Hope this helps.
-
Hey terry it helped a lot.
Now I´m able to get each field separatedly.
I used the regex ^L1(?:,(\d+)){N} , where N is the column after L1 that I will get. Thanks so much for helping , hope this regex might be useful for somebody.