Quantcast
Channel: Statalist
Viewing all articles
Browse latest Browse all 65096

Create local variable list with *

$
0
0
I have a large number of variables starting with either with urb7, urb8 or urb9. I would like to create a local list that includes all these variables, but excludes variables such as urb3.

I tried

Code:
local urban urb7* urb8* urb9*
di `urban'
which gives out a syntax error and

Code:
local urban urb7* urb8* urb9*
di "`urban'"
which gives out "urb7* urb8* urb9*".

I would like to be able to see the full list of variables, so I can get the list working in a loop afterwards (but that's another story).

So, how do I get the list to contain: urb7_arbitrary_text1, urb7_arbitrary_text2, urb8_arbitrary_text1, and so on?

Thank you very much.

Best regards,
Milan

Viewing all articles
Browse latest Browse all 65096

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>