02-07-2011 04:56 AM
Hi I'm an amatuer at Labview and am encountering a problem. I'm hoping if someone can tell me if it possible in labview to distinguish the words in a string of the form, "RajatKumarWasAtTheZooYesterday".
So, here I'm looking to write a program that can identify and distinguish the strings: Rajat Kumar Was At The Zoo Yesterday
I hope to represent each word in a different way and so would require a program that can identify special characters, such as capitalized alphabats.
Second query: Is it possible to distinguish certain special characters in a string. For example, if the string is "RajatKumar,WasAtTheZooYesterday123", I would want to identify the comma after RajatKumar and/or the numbers123 at the end.
Thanks for helping out!!
Rajat
02-07-2011 05:05 AM
First I would recommend Google the term ASCII. In the comparison palette you will also find some string compare options. Then working with strings it can sometimes like you do it will in most cases be more easy to convert it to a byte array.

02-07-2011 06:07 AM
hmmm..... using ASCII codes is a good idea.
But how do I convert a character to its ASCII code, in LabView. Is there a specifioc command for that????
But thanks, its a good thought.
Cheers!!
02-07-2011 06:17 AM
to know whether it is a capital letter, convert to byte if> 65 and <91 it is a capital letter. Converting the string to a byte array will give you the decimal value of the ascii representation.
Have attaced an Ascii table
02-07-2011 06:28 AM
In order to convert a string to byte array just use this function

02-07-2011 06:33 AM
thanks guys... I figured it out...!!
cheers.
Rajat
02-08-2011 04:13 PM
02-08-2011 05:28 PM
Regexes are amongst my favorite things, also keep in mind the not-so-often used 'Lexical Class'
02-08-2011 05:38 PM
@RAJAT123 wrote:
"... alphabats ..."
I guess these are the ones that appear first from under the congress bridge in the evening. 😄