Dear Statalist,
Unless I'm wrong, capture confirm doesn't seem to work with wildcards (I want to check whether there is at least one variable matching the pattern, say, vargroup_*, and depending on the result, do different actions). Is there a way to work around this limit? I tried using
But in the case where there is no variable matching the pattern, the code won't work. How can I take this into account?
Thank you very much for the help. I wish you all a happy new year.
Unless I'm wrong, capture confirm doesn't seem to work with wildcards (I want to check whether there is at least one variable matching the pattern, say, vargroup_*, and depending on the result, do different actions). Is there a way to work around this limit? I tried using
Code:
unab v : vargroup_* capture confirm variable `v'
Thank you very much for the help. I wish you all a happy new year.
Comment