Hello. I wanted to make a Stata data file and name the file using local macro and ustrregexra; I wanted to switch "-" to "_" using ustrregexra.
Here are my codes:
-----
sysuse auto
local x ustrregexra("BSI-TRJ-IBC","-","_")
di `x'
save "`x'.dta", replace
-----
And I got an error message: invalid 'BSI-TRJ-IBC'
I would like to know what I missed. Thank you for your time!
Here are my codes:
-----
sysuse auto
local x ustrregexra("BSI-TRJ-IBC","-","_")
di `x'
save "`x'.dta", replace
-----
And I got an error message: invalid 'BSI-TRJ-IBC'
I would like to know what I missed. Thank you for your time!
Comment