Keyboard Shortcuts
Likes
Search
parsing characters after specific text in a string - ideas?
Hi All,
hoping the collective brainpower of the group may have a solution. Sometimes I get stuck on the simple things.
Let’s say the string coming in is afgfadaefdvdvsdsscdwqout23fdhhgfgsjdgfsdfiop I want to parse the 23 after out. So need to look at the string for out then parse the next two characters after out. Any ideas? Sometimes I get stuck on the easiest things. 73 |
Dave Did you try the string node? ? It is not installed by default.? ? It has about 20 parsing options. Mike?? On Fri, Jul 10, 2020 at 11:06 AM David De Coons wo2x <RocketNJ@...> wrote: Hi All, |
开云体育I do have the string node installed. I probably should have also been a little more specific. If I send the UDP listener to buffer I get a hex stream Meter 16 shows up as 00 16 d ce ? I want to parse the c de then convert to base 10 and divide by 240 to result in 13.725 volts. ? The meter stream is not consistent in length or position as some meters update quicker than others. ? 73 Dave wo2x ? ? Sent from for Windows 10 ? From: Michael Walker
Sent: Friday, July 10, 2020 11:30 AM To: [email protected] Subject: Re: [nodered-hamradio] parsing characters after specific text in a string - ideas? ? Dave ? Did you try the string node? ? ? ? It is not installed by default.? ? It has about 20 parsing options. ? Mike?? ? On Fri, Jul 10, 2020 at 11:06 AM David De Coons wo2x <RocketNJ@...> wrote:
? |
开云体育I addition to wanting to parse x characters after a specific phrase in a string I would like to be able to do the same with a buffer stream. ? Thanks Dave wo2x ? ? Sent from for Windows 10 ? From: David De Coons wo2x via groups.io
Sent: Friday, July 10, 2020 11:06 AM To: [email protected] Subject: [nodered-hamradio] parsing characters after specific text in a string - ideas? ? Hi All,
Let’s say the string coming in is afgfadaefdvdvsdsscdwqout23fdhhgfgsjdgfsdfiop I want to parse the 23 after out. So need to look at the string for out then parse the next two characters after out. Any ideas? Sometimes I get stuck on the easiest things. 73 ? |
Hi Gary,
toggle quoted message
Show quoted text
?
I have not gone back to investigate it since posting the question.
?
The radio returns rfpower= for the current TX slice plus every band set up in the TX Band Setting table. I want to parse only the TX slice power slider value.
?
I have an idea and can test tomorrow. Have to do some volunteer consulting for my former employer this afternoon.?
?
73
Dave wo2x ?
On Jul 16, 2020, at 12:51 PM, K6HN <gary@...> wrote:
|
Here is what I would use to get the '23' after the 'out'. |
开云体育The issue is the messages are not always the same length and the word rfpower= appears over 10 times. I need to look for a unique keyword for the portion pertaining to the transmit slice.?The other option I have is to get band data from my amp flow (80 for example) then do an if then function where if (band == 80){ Msg.band = 80 } Do that for all bands.? Then look for band 2 in the stream and then parse the Number after rfpower= Since the length and contents of the messages from the radio vary that is probably the best way.? 73 Dave wo2x Sent from my waxed string and tin cans.? On Jul 16, 2020, at 1:20 PM, K6HN <gary@...> wrote:
|