LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

regular expresion to match html tags

Solved!
Go to solution

Hi, everyone, the following is about component code that I'd would like to store in a .xls file. I'm using LabVIEW 2009

 

I would like to match these words in bold, but I don't know how to handle the attributes ! And I don't find the suitable Regex

 

<(?<b>.*).*></\k<b>>

 

The regex should match upper and lower case,

thanks in advance

 

 

 eg :

<td width="124"><p align="center"><b><font color="blue" size="3">PS1</font></b></p></td>

<TD WIDTH="125"><P ALIGN="CENTER"><B><FONT COLOR="BLUE" SIZE="3">PS3</FONT></B></P></TD>  

<td width="125"><p align="center"><b><font color="blue" size="3">MFC11</font></b></p></td>

0 Kudos
Message 1 of 11
(4,566 Views)
Solution
Accepted by bauer65

This is the best I could do.

18615iB6644572EE455184

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

Message 2 of 11
(4,553 Views)

I found a solution, I'm sharing it with you 😄

 

 

0 Kudos
Message 3 of 11
(4,534 Views)

I don't know about you, but I like Jim's solution better.... Smiley Wink

 

Tip: CSS is the preferred method for sylizing text, rather than using tags like <b>. A preferred alternative is to use the <strong> tag.

Message 4 of 11
(4,509 Views)

I like my second solution even better, although I haven't thoroughly tested it.  I don't think it'll work for an arbitrary number of tags.

 

18669i04490E3882978BCB

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

Message 5 of 11
(4,485 Views)

@bauer65 wrote:

I found a solution, I'm sharing it with you 😄

 

 


I thought you were kidding...  What a solution.  Smiley Surprised
(Or, "What?  A solution?")

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

Message 6 of 11
(4,471 Views)

What's wrong with you ? why are you so mean ?

 

I made my Vi and it works on my station : you give an URL address and it operates on the source code to find what are between

 

"<tag>what I want to get back</tag>

0 Kudos
Message 7 of 11
(4,438 Views)

I didn't intend to be mean.  I apologize.  You used a :D, which made me think you were laughing at your own solution (so I thought you were kidding) and your original post said nothing about getting information from a URL.

Please forgive me or, at least, ignore my impolite post.

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

Message 8 of 11
(4,426 Views)

 


@bauer65 wrote:

What's wrong with you ? why are you so mean ?

 

I made my Vi and it works on my station : you give an URL address and it operates on the source code to find what are between

 

"<tag>what I want to get back</tag>


That's not a fair response. Based on your original post you indicated that you were looking for the bolded text. Jim's solution was very clean, and it's irrelevant whether you're getting the string from a URL or from a string constant. In your solution I see no searching for bold text, and your line "<tag>what I want to get back</tag>" implies that you're actually trying to perform something completely different than what you initially asked for. So perhaps it would be best if in the future the problem is stated a bit more clearly to prevent any confusion or misinterpration.

 

Message 9 of 11
(4,404 Views)

 


@bauer65 wrote:

why are you so mean ?


I don't think I'm mean; I'm average.

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

Message 10 of 11
(4,392 Views)