LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

string to 2D string array conversion

I wish if I could give you more than 1 Kudos.....!!

 

many thanx for this piece of valuable information.


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

 Make your LabVIEW experience more CONVENIENT.


0 Kudos
Message 11 of 23
(1,925 Views)

New and improved.  The results are sorted.

 

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 Kudos
Message 12 of 23
(1,919 Views)

Hi,

   May i know how the reqular expression is derived?.

Is there any sources available to know the reqular expression.

Thanks

Kalyan

 

0 Kudos
Message 13 of 23
(1,910 Views)

Hi,

   Order is important as you said. I would like to build 2D array like this. How to use reqular expression to achieve this?.

 

for example like this.

 

BASELINE_1.2   locked

BASELINE_1.8   

BASELINE_4.5   locked

 

Thanks

Kalyan

 

0 Kudos
Message 14 of 23
(1,902 Views)

@Kals wrote:

Hi,

   May i know how the reqular expression is derived?.

Is there any sources available to know the reqular expression.

Thanks

Kalyan

 


(?:"([^"]+)")|(?:\(([^)]+)\))

 

Expressions in square brackets are character classes, beginning one with a caret negates it. So, [^"] looks for anything that's not a quote.

 

The plus sign says to find one or more of the preceeding item.  [^"]+ says to find one or more of anything that's not a quote.

 

Putting a regex in parentheses forms a group and a submatch/backreference.  They can be used later in the search (but I didn't do that here) and they are available in the expandable terminals at the bottom of the node.  Beginning a group with ?: groups the items but doesn't make a backreference/submatch.  ([^"]+) saves one or more of anything that's not a quote in a submatch.

 

"([^"]+)" looks for a quote followed by one or more of anything that's not a quote and saves it in a submatch.  This submatch is what we're looking for.

 

The pipe | is the Boolean OR operator.  We're looking for quotes OR parentheses, so I need two regexps to find one OR the other.  The regex on the right side of the pipe is similar to that on the left, except that you have to
escape \ the parentheses to search for them.

 

All of this, and more, is explained in the "regex" link in my signature.

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 Kudos
Message 15 of 23
(1,896 Views)

Hi,

   Order is important as you said. I would like to build 2D array like this. How to use reqular expression to achieve this?.

 

for example like this.

 

BASELINE_1.2   locked

BASELINE_1.8   

BASELINE_4.5   locked

 

Thanks

Kalyan

 

0 Kudos
Message 16 of 23
(1,889 Views)

This was easier.  Smiley Surprised

 

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 Kudos
Message 17 of 23
(1,883 Views)

Hi,

   In the Spreadsheet String To Array Function by default array type is 2D Dbl. You have changed to string. I am able to change to string.

But you have initialised with Null i thing. How do you changed?. Please explain.

Thanks

Kalyan

 

0 Kudos
Message 18 of 23
(1,847 Views)

I don't understand your question.  Spreadsheet String To Array is not initialized with a default value the way a Decimal String To Number is.

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 Kudos
Message 19 of 23
(1,841 Views)

Hi,

   Please see the attached image. How you created it?. I am not able to. i am having problem If i wire with string constant.

Thanks

Kalyan

 

 

0 Kudos
Message 20 of 23
(1,838 Views)