04-22-2022 05:13 AM
hello !
I have this string : <tr><td class='hdr_name'><b>Station ID: </b></td><td class='hdr_value'><b>BT-LED-PUISSANCE</b></td></tr>
(yes it's HTML)
I want to erase all the parts delimited by <>, so in the end i must have ''Station ID: BT-LED-PUISSANCE''
I think i must use a Scan from string but i don't know what to put in the format string. any help ?
Solved! Go to Solution.
04-22-2022 11:28 AM
How is this related to "signal conditioning" and hardware? (...since you posted here in this forum)
What programming language are you using?
04-25-2022 01:30 AM
Assuming you are using LabVIEW, here is a solution.
No doubt a RegEx or html specialist will be able to suggest a more effective one.
04-25-2022 07:52 AM
ok i'm sorry i didn't realy knew where to put this request, and to answer, yes i'm using labview (the community eddition).
after taking the time to test, it works as i wanted thanks you !
04-25-2022 10:13 AM - edited 04-25-2022 10:41 AM
(Ah, good to know that this is a LabVIEW question! I have moved this thread to the LabVIEW forum for better visibility.)
The most efficient way is to operate directly on the bytes. Here's one possibility:
(I am sure it can be simplified further)
04-25-2022 10:46 AM - edited 04-25-2022 10:48 AM
@altenbach wrote:
(Ah, good to know that this is a LabVIEW question! I have moved this thread to the LabVIEW forum for better visibility.)
The most efficient way is to operate directly on the bytes. Here's one possibility:
(I am sure it can be simplified further)
I'm fairly sure, (under the condition that the Tags are well formated) that ">" Implies a preceding "<"
That and a value changed vim should make the code a bit easier to read.
04-25-2022 10:57 AM
@JÞB wrote:That and a value changed vim should make the code a bit easier to read.
Well, a "!=" (or XOR) toggles the Shift register if the other input is TRUE. That's all we really need. Not sure how you would implement it using the vim and how that would simplify things. 😄
04-25-2022 12:10 PM
If you want code that's easier to read, here's an alternative. (Still no vim needed). 😄
04-25-2022 12:29 PM
04-25-2022 01:01 PM
@jcarmody wrote:
Learning a little Regex is helpful sometimes. I can testify to that because I've only learned a little...
Certainly better than this old suggestion 😄
In my defense, I am sure my code is orders of magnitude faster. 😄 (not tested)