LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I find special characters in a string

Hi,

I have a small task where I have to find special characters in a given string, Can anyone suggest.......................

0 Kudos
Message 1 of 7
(10,741 Views)

Hi kwan,

you can use the "search and replace" function, "match pattern" or you convert your string to an array of U8 and use some Array functions to do it.

I recommend to see also this link.

 

Mike

Message 2 of 7
(10,738 Views)

Hi Kwan,

 

       U could use "Scan from String" function to find any character match 

 

 

Regards,

 

Raja 

0 Kudos
Message 3 of 7
(10,736 Views)

Hi..

 

   This may help.......

Message 4 of 7
(10,734 Views)

What is your definition of a "special character", could you be a bit more specific?

Do you simply want to find the position of a specific character in the string?

Can it occur more than once and you want to find all occurences?

What should happen if the special character does not exist?

 

For programming purposes, all 256 possible 8 bit characters (x00-xFF) can be treated the same. Non-printing characters can be entered in \-codes or hex display if needed.

Message 5 of 7
(10,725 Views)

Thanks for the suggestion, the picture really helps that is what exatly I want.........................Smiley Very Happy

0 Kudos
Message 6 of 7
(10,724 Views)

I'm trying to search within a *.txt file and i'm looking for the $ character.

 

The *.txt contains thinks like these:

 

datadatadata$variable

 

I'm trying to extract the name of the variable. Can any one help?

 

There are about 10 variables per text file and the variable name may be different between files.

 

Thanks!

 

 

EDITION

 

I found the solution I must add the "\" character to match special characters! Thanks!

Message Edited by ethan85 on 12-26-2008 10:08 AM
0 Kudos
Message 7 of 7
(10,446 Views)