Jump to content
LabRatzz

Parsing

Recommended Posts

Hello,

 

I have these to strings of data how do i use labview to differentiate bettwn the two? the first four letters are always the same and the rest changes,

 

SDFS = Data1

 

ASXP = Data2

 

I guess what i want is when the data comes... labview automaticly knows this line is DATA1 or this line is DATA2

 

 

SDFS~S0000000040942770200002014016980156XXX

 

ASXP`0100361553364651\`

 

Share this post


Link to post
Share on other sites

Many ways.  How about getting the string subset on the first four characters and seeing if they equal SDFS or ASXP then getting the string subset of there for the appropriate length and offset for each.

 

I'm sure regular expression could do it too.  Post your VI you have tried and show what you couldn't get to work.

Share this post


Link to post
Share on other sites

Try the example "Extract Numbers with Match Pattern.vi"

Under the Menu items Help>>Find Examples... 

Share this post


Link to post
Share on other sites

I'm sure regular expression could do it too.  

 

As someone wiser (and more sarcastic) than myself has already pointed out...

 

Some people, when confronted with a problem, think 

“I know, I'll use regular expressions.†  Now they have two problems.

 

:lol:

  • Like 1

Share this post


Link to post
Share on other sites

As someone wiser (and more sarcastic) than myself has already pointed out...

 

Some people, when confronted with a problem, think 

“I know, I'll use regular expressions.†  Now they have two problems.

 

:lol:

Notice I didn't say to use regular expressions, I just said that it could be used.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.