I am trying to generate two scalars to store numbers from the string "crmlaw_2014_2018" and "test_2015_2017"
The code I wrote is:
Code:
local major crmlaw_2014_2018 test_2015_2017 foreach i of local major{ scalar a = strpos("`i'","_" ) scalar b = substr("`i'",a+1,a+4) scalar c = substr("`i'",-4,.) }
Thank you for any insight for this!
0 Response to "substr" does not work for the string with "_"
Post a Comment