05-03-2010 01:44 PM - edited 05-03-2010 01:49 PM
The match pattern primitive has issues when dealing with ranges of control characters. For example I want to match any control character (0x00-0x1F) in the input string with the pattern [\00-\1F]. The match pattern primitive does not consider that pattern as a range but as three characters: \00, - (dash) and \1F. It will return a match only if one of these three characters is in the input string. It works correctly when using \codes for other ranges like [\30-\39] to match decimal digits.
LabVIEW 8.6
LabVIEW, C'est LabVIEW
Solved! Go to Solution.
05-03-2010 02:05 PM
If I undestand you correctly, looking to match "0x0F" as an example.
Then try this string for the regular expression: 0x[0-9,A-F][0-9,A-F]
James
05-03-2010 02:25 PM - edited 05-03-2010 02:27 PM
LabVIEW, C'est LabVIEW
05-03-2010 03:20 PM
OK, I obviously didn't pay close attention to your post.
Try using Match Regular Expression and then use [\x00-\x1F] for the regular expression input.
I hope this is closer to understanding your problem than my first reply.
Regards,
James
05-03-2010 03:24 PM
LabVIEW, C'est LabVIEW
05-03-2010 05:53 PM
Strictly speaking it is not a bug! The online help for the Match Pattern says:
[] Encloses alternates. For example, [abc] matches a, b, or c. The following character has special significance when used within the brackets in the following manner:
-(dash) | Indicates a range when used between digits, or lowercase or uppercase
letters; for example, [0-5], [a-g], or [L-Q]. |
05-04-2010 07:49 AM
You are right (again) rolfk!
However there is no such (arbitrary, imho) range limitation in similar primitives like Scan From String (format %[\00-\1F] works as expected)and Match Regular Expression.
LabVIEW, C'est LabVIEW