I need to have a .NET regex to match "[@foo]" from "applicant_data/contact_number[@foo]" w/c I can already do using the pattern "\[@(.*?)\]".
However I want to make an exception so that "applicant_data/contact_number[@foo=2]" does not match the pattern. So the question is what should be the regular expression so that it will get any valid alphanumeric ([@bar],[@theVar],[@zoo$6]) but not [@bar=1], [@theVar=3]?
fooconstant or can it vary? Also, you want to exclude it only for the number2or any number?