キャンセル
次の結果を表示 
次の代わりに検索 
もしかして: 

string to 2D string array conversion

Hi,

I have a string like this below. I would like to extract all the texts within the quotes "  ". How to do that?.

 

05-Mar.20:52   skalyana    label type "BASELINE_1.2" (locked)
28-Apr.19:19   skalyana    label type "BASELINE_1.8"

 

i have tried using Match regular expression. I am able to extract one text within " ".

 

I would like to know how to extract all the text within " "

I have attached the vi for your reference

Thanks

Kalyan

 

0 件の賞賛
メッセージ1/23
4,243件の閲覧回数

Use a While Loop with a Shift Register to keep looking until you've found them all.

 

string to 2D string array conversion.png

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

0 件の賞賛
メッセージ2/23
4,225件の閲覧回数

Hi,

    Thanks for the solution. One more clarification. I would like to remove the character " from the output.

Example like this

BASELINE_1.2

BASELINE_1.8

How to do that?

Thanks

Kalyan

0 件の賞賛
メッセージ3/23
4,218件の閲覧回数

With a submatch, notice the parentheses and the new output (Match Pattern is expandable).

 

string to 2D string array conversion.png

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

メッセージ4/23
4,217件の閲覧回数

Hi,

   I would like to extract the text between the character ( ) also.

 for example here locked (locked)

Thanks

Kalyan

 

0 件の賞賛
メッセージ5/23
4,206件の閲覧回数

I don't see parentheses in your sample data.  Do you want what's in quotes AND parentheses or are you confused about the parentheses I've added?

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

メッセージ6/23
4,201件の閲覧回数

Hi,

 

05-Mar.20:52   skalyana    label type "BASELINE_1.2" (locked)
28-Apr.19:19   skalyana    label type "BASELINE_1.8"

 

I need both the text within " " and within ( ) from the above sample.

 

Thanks

Kalyan

 

0 件の賞賛
メッセージ7/23
4,192件の閲覧回数

Sorry, I missed seeing (locked) in your original data.  This doesn't return them in order.  Is that important?

 

string to 2D string array conversion_BD.png

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

メッセージ8/23
4,183件の閲覧回数

Hi Jim,

 

its simply superb...スマイリー ハッピー

 

how to get more info on these 'Regular Expressions', is there any KB (knowledge base) or tutorial available for the same.


I am not allergic to Kudos, in fact I love Kudos.

 Make your LabVIEW experience more CONVENIENT.


0 件の賞賛
メッセージ9/23
4,178件の閲覧回数

@moderator1983 wrote:

how to get more info on these 'Regular Expressions', is there any KB (knowledge base) or tutorial available for the same.


Click on the "regex" link in my signature; it's my favorite.  Darin.K contributed this cool tool to the Community; it's worth downloading and playing with.

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

メッセージ10/23
4,175件の閲覧回数