Hello...
I have a string variable that has 3-5 words. I want to split it into two parts.
Here's the example


Code:
clear all
input str50 product
"105 Dairy products - Paneer, curd etc"
"011 Vegetable cultivation"
"563 Tea selling"
"561 Hotel (restaurant)"
"105 Dairy products - Paneer, curd etc"
"321 Jewellery making"
"107 Bakery"
"563 Tea and Snacks"
"011 Vegetable cultivation"
"105 Dairy products - Paneer, curd etc"
"105 Dairy products - Paneer, curd etc"
"011 Vegetable cultivation"
"011 Fruits production"
"000 Others"
"011 Vegetable cultivation"
"013 Plant nursery"
end
I want the string line to be separated from the three digits. That is to say, it should look like:

Code:
clear all
input str10 product str50 product1
"105" "Dairy products - Paneer, curd etc"
"011" "Vegetable cultivation"
"563" "Tea selling"
"561" "Hotel (restaurant)"
end
I tried it with split command. But could not succeed.
I also went through this thread:
https://www.statalist.org/forums/for...at-has-a-space

Any help will be greatly appreciated.