LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Get string inside brackets - Using Scan from string

Solved!
Go to solution

I have a very basic question here. I would like extract a portion of a string which is inside brackets (Example: I work with [National Instruments]). In the string I only want to extract National Instruments, I do know logic to extract by finding the brackets and extracting them. But I am interested in using the Scan from string or possibly any other primitive in one shot. Please suggest if anyone has any idea, I am really not use to the format specifiers. I got this link for reference but I am not able to figure out a solution.

-----

The best solution is the one you find it by yourself
0 Kudos
Message 1 of 6
(6,245 Views)
Solution
Accepted by P@Anand
Message 2 of 6
(6,224 Views)

Thank you.

-----

The best solution is the one you find it by yourself
0 Kudos
Message 3 of 6
(6,212 Views)

Hi,

 

I cannot say that it is the best solution, I use two Scan From String functions instead of one but it does work, so far 😉

 

I use Characters in set.

 

 

get string inside brackets.png

 

I could not attach VI so FP is below.

 

get string inside brackets fp.png

 

 

Duri
Message 4 of 6
(6,209 Views)

I did this already and got it working. But earlier I have seen extracting the string using a single primitive and thats why I posted specifically for that. Thanks for the response.

-----

The best solution is the one you find it by yourself
0 Kudos
Message 5 of 6
(6,205 Views)

,get string inside brackets_2.pngget string inside brackets fp_2.png

 

last try 🙂

 

Duri
Message 6 of 6
(6,180 Views)