Hi All,
I'm having a problem trying to search a string to determine the presense of a value, which could be a range.
So for instance, if I have the following string:
A23: M2 123 456 7890
And I want to determine if it contains, non-numeric data (so the A and the M as well as the : would be identified, but I don't need to know the specific character.
I've tried several combinations of OCCURS, AT, BETWEEN CHR() but can't seem to get one that works, due to the "Range" at hand.
If we called the string lcText My expression looked something like:
lnRetVal = OCCURS(BETWEEN(lcText,CHR(65),CHR(90)),lcText)
lnRetVal = AT(BETWEEN(lcText,CHR(65),CHR(90)),lcText,1)
(in these cases I was just looking for Uppercase Alpha as that will do)
But they fail, and the BETWEEN I think is the problem, but I don't see any other function that would do it?
Is this possible, or do I need to tear the whole string down byte by byte and examine its ASC value?
I tested with both to try to get BETWEEN to work with the string search, but what I'm really after is the AT() position of the first occurrence of a "alpha" character.
I realize in this example, I should be using UPPER(lcText), but the string I was testing with was already uppercase, so I was just trying to make it work in test environment before I put it in the code.
Best Regards,
Scott
ATS, CDCE, CTIA, CTDC
"Everything should be made as simple as possible, and no simpler."
I'm having a problem trying to search a string to determine the presense of a value, which could be a range.
So for instance, if I have the following string:
A23: M2 123 456 7890
And I want to determine if it contains, non-numeric data (so the A and the M as well as the : would be identified, but I don't need to know the specific character.
I've tried several combinations of OCCURS, AT, BETWEEN CHR() but can't seem to get one that works, due to the "Range" at hand.
If we called the string lcText My expression looked something like:
lnRetVal = OCCURS(BETWEEN(lcText,CHR(65),CHR(90)),lcText)
lnRetVal = AT(BETWEEN(lcText,CHR(65),CHR(90)),lcText,1)
(in these cases I was just looking for Uppercase Alpha as that will do)
But they fail, and the BETWEEN I think is the problem, but I don't see any other function that would do it?
Is this possible, or do I need to tear the whole string down byte by byte and examine its ASC value?
I tested with both to try to get BETWEEN to work with the string search, but what I'm really after is the AT() position of the first occurrence of a "alpha" character.
I realize in this example, I should be using UPPER(lcText), but the string I was testing with was already uppercase, so I was just trying to make it work in test environment before I put it in the code.
Best Regards,
Scott
ATS, CDCE, CTIA, CTDC
"Everything should be made as simple as possible, and no simpler."