02-13-2012 03:41 PM
Hi, I try to remove unused characters from a string, but I can't find a function to do that.
The string like: 0000 0000 0000 0000 0000 0000 0130 3130 3030 3030 3004 0000 0000 0000 0000 0000 0000 0000 , I need the characters from 01 to 04.
I need some tips.
Solved! Go to Solution.
02-13-2012 03:43 PM - edited 02-13-2012 03:43 PM
02-13-2012 03:45 PM
First, what defines an "unused character"? Are all the unused characters 00? Can 00 ever occur in the desired data? Are the characters 01 and 04 always the first and last characters? Can either of those characters occur in the data?
Removing characters is not difficult. There are several string and array functions which may be used. To decide which to use and how to use it, the decision making porcess muct be defined first.
Lynn
02-13-2012 03:46 PM
yes, 0x00 and \00, NULL character. the string I posted is in Hex mode.
02-13-2012 04:14 PM
yes,unused characters are 0x00 and \00, NULL character the string I posted is in Hex mode.
02-14-2012 05:18 AM
You could use Search and Replace String to remove the null characters. It doesn't help if you have valid nulls within your data, but it's a start.
02-14-2012 06:04 AM
If the characters between the SOH and EOT did have an NULL, then Match Regular Expression might be a choice:
Find \x01, find anything BUT \x04, then find \x04