LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Match Regular Expression missing a pattern

Thanks yall. So, the bandaid solution ended up requiring me to look at the probed data. Exactly as Phillip said, 

 


@PhillipDBrooks wrote:

LabVIEW may not support extended ascii chars


When I looked at some probed data, the ° character showed up like this:

 

JBatSRO_1-1770043277433.png

 

So, I basically just slapped that into one of my filters/expressions:

 

JBatSRO_2-1770043380635.png

 

And that seemed to do the job.

 

While I personally have zero Python experience, I imagine some of these python suggestions would be helpful for others.

 

I totally redid my various regex filters and managed to shave off a step or two. Maybe if I do it again down the road I can get one or two more out.

0 Kudos
Message 11 of 14
(95 Views)

@JBatSRO wrote:

Thanks yall. So, the bandaid solution ended up requiring me to look at the probed data. Exactly as Phillip said, 

 


@PhillipDBrooks wrote:

LabVIEW may not support extended ascii chars


When I looked at some probed data, the ° character showed up like this:

 

JBatSRO_1-1770043277433.png

 

So, I basically just slapped that into one of my filters/expressions:

 

JBatSRO_2-1770043380635.png

 

And that seemed to do the job.

 

While I personally have zero Python experience, I imagine some of these python suggestions would be helpful for others.

 

I totally redid my various regex filters and managed to shave off a step or two. Maybe if I do it again down the road I can get one or two more out.


Could you just change that segment of the string to [^<]*? Your problem seems to be that you're trying to list all possible allowable characters, but really you're just trying to find the <, right?

0 Kudos
Message 12 of 14
(78 Views)

@BertMcMahan wrote:


Could you just change that segment of the string to [^<]*? Your problem seems to be that you're trying to list all possible allowable characters, but really you're just trying to find the <, right?


I think in my next iteration maybe that is something I could do. I know part of why I used the specific string set is because I wanted to make sure I only grabbed certain tables and sections and things. Like, I think I am expecting certain characters in some of the tables that I don't want filtered out. And when I did [\s\S]* I accidentally ate the entire page. I'll have to take a look at this!

0 Kudos
Message 13 of 14
(75 Views)

@JBatSRO wrote:

 

When I looked at some probed data, the ° character showed up like this:

 

JBatSRO_1-1770043277433.png


thats an encoding error.

 

you might want to try the utf-8 to (labview)text function https://forums.ni.com/t5/LabVIEW/undocumented-function-quot-text-to-utf-8-quot/m-p/1034616#M460673

Message 14 of 14
(55 Views)