TheInsider
Programmer
Hi,
I'm using the VBScript.RegExp library in VBA. What I'm trying to do is search as CSV string to find a substring that doesn't match a given criteria. I'm not interested in using the Matches collection; I only want to know True or False whether the criteria was met.
For example, if I have the following string:
",Z(A),Z(A),Z(A)"
I need a regular expression that will tell me if there is a substring that doesn't match "Z(A)". In the above case, this would be false. (The expression I need should be designed to ignore commas.)
Now, if I have the following string:
",Z(A),A,Z(A)"
I want to be alerted to the fact that "A" isn't equal to the string "Z(A)"
Also, with:
",Z(R),Z(A)"
I want to be alerted that "Z(R)" isn't equal to "Z(A)".
Apparently, Microsoft's implementation is supposed to have an exclusion code ?! however, it doesn't seem to do anything.
I.e. "(?!Z\(A\))" doesn't work and neither does "(Z\(A\)){0}"
Thanks
I'm using the VBScript.RegExp library in VBA. What I'm trying to do is search as CSV string to find a substring that doesn't match a given criteria. I'm not interested in using the Matches collection; I only want to know True or False whether the criteria was met.
For example, if I have the following string:
",Z(A),Z(A),Z(A)"
I need a regular expression that will tell me if there is a substring that doesn't match "Z(A)". In the above case, this would be false. (The expression I need should be designed to ignore commas.)
Now, if I have the following string:
",Z(A),A,Z(A)"
I want to be alerted to the fact that "A" isn't equal to the string "Z(A)"
Also, with:
",Z(R),Z(A)"
I want to be alerted that "Z(R)" isn't equal to "Z(A)".
Apparently, Microsoft's implementation is supposed to have an exclusion code ?! however, it doesn't seem to do anything.
I.e. "(?!Z\(A\))" doesn't work and neither does "(Z\(A\)){0}"
Thanks