02-25-2011 09:12 AM
Hi,
I was just reading through this discussion and would be happy if you could tell me how to write a string code to the regular expression match to extract the time stamp from an sms text message. My string input is the following:
at+cmgr=1\r\r\n+CMGR:\s"REC\sREAD","+447891089303",,"11/02/24,14:29:32+00"\r\nIT:26.102/IB:11.964/OU:0FL:360.98\s\r\n\r\nOK\r\n.
Regards,
Hammy.
02-25-2011 09:38 AM
02-25-2011 02:07 PM
Ever have a need to replace large blocks of ASCII hex with the binary equivalents? This code snippet does just that. It actually looks for the string <HEX: xxxx xxxx xxxx xxxx> and replaces that with the binary data. This works over large blocks of text and will work if the data is split between chunks. For example, if you are reading a large file in chunks and converting the data on the fly. It would be trivial to modifiy the delimiter that defines the block to be converted. This is useful if you have a hex dump saved in an ASCII file and you need to convert it.
05-10-2011 07:30 AM - edited 05-10-2011 07:31 AM
Thanks Mark,
Here's a simple regEx to remove all <tags> from a string.
05-11-2011 08:40 AM - edited 05-11-2011 08:40 AM
Any suggestions on how I could improve this Scan From String? (or maybe use some other function)
All I need is the two numeric values (doubles). I do not care about the leading text (as shown)
I was trying to accomplish it by just extracting the numeric values...
-regEx NooB-
05-11-2011 09:47 AM
@Ray.R wrote:
Any suggestions on how I could improve this Scan From String? (or maybe use some other function)
All I need is the two numeric values (doubles). I do not care about the leading text (as shown)
I was trying to accomplish it by just extracting the numeric values...
-regEx NooB-
Try this:
You may need to play with the regular expression if your numbers can come back without the decimal point. You will also need to convert the strings to numbers.
05-11-2011 12:02 PM
Here is a common construct I use to extract numbers from a string.
06-16-2011 07:57 AM
This one is from jcarmody on this thread
http://forums.ni.com/t5/LabVIEW/Different-fonts-in-string-indicator/td-p/1601458
He helps someone change color on a string indicator using > or < to determine color.
08-08-2011 10:21 AM
This one is from Ray R on this thread:
http://forums.ni.com/t5/LabVIEW/regular-exp/td-p/1662386
08-08-2011 05:15 PM
and the improved version from Jim: