LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Time for another game of "Fix My Rube"

When I went to impliment this, I realized because the delimiters are actually telling me something about the following data, I need to know which delimiter was at the beginning of each match. Is there any easy way to get this? There doesn't seem to be (i.e. it's not an output of the function).

0 Kudos
Message 11 of 19
(1,226 Views)

Use my VI, but wire the array of delimiters to the "operators" input instead (leave delimiters unwired), and also autoindex the "token Index" output.

 

You'll get two arrays, one with small strings and one with indices. Whenever the index is -1, you get the elements of the original solution. If the index is 0 or larger, it points to the element in the delimiter array. 

 

 

 

(but wait a few minutes, maybe somebody will post a regex solution :D)

Message 12 of 19
(1,222 Views)

@altenbach wrote:

 

(but wait a few minutes, maybe somebody will post a regex solution :D)


I guess we'll see! Thanks though, works great.

0 Kudos
Message 13 of 19
(1,206 Views)

Simply change the replace string to:

 

\n$1\t

 

Change the output to a 2D array and the first column is your token and the second is the string.

Message 14 of 19
(1,198 Views)

Darin, you're slacking.  That was more than just a few minutes...


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 15 of 19
(1,194 Views)

@Darin.K wrote:

Simply change the replace string to:

 

\n$1\t

 

Change the output to a 2D array and the first column is your token and the second is the string.


Oh regex's...

0 Kudos
Message 16 of 19
(1,194 Views)

@crossrulz wrote:

Darin, you're slacking.  That was more than just a few minutes...


He must actually be working today Smiley Tongue

0 Kudos
Message 17 of 19
(1,193 Views)

Darin, I'm sure you've seen this already and probably already have the shirt but I couldn't resist posting it as you appear to be the foremost expert on regex in LabVIEW.

Charles Chickering
Architecture is art with rules.

...and the rules are more like guidelines
Message 18 of 19
(1,101 Views)

@Charles_CLA wrote:

Darin, I'm sure you've seen this already and probably already have the shirt but I couldn't resist posting it as you appear to be the foremost expert on regex in LabVIEW.


I like the shirt. My kids would give me lots of grief if I got it though. Smiley Very Happy



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 19 of 19
(1,080 Views)