Code:
* Example generated by -dataex-. To install: ssc install dataex
clear
input str28 country
"UK"                         
"France"                     
"France / Singapore / UAE"   
"Switzerland"                
"Spain / US"                 
"Italy"                      
"Switzerland"                
"France"                     
"Netherlands"                
"UK"                         
"FR / GB / DE / ES / IT / PL"
end
Code:
    +-----------------------------+
     |                     country |
     |-----------------------------|
  1. |                          UK |
  2. |                      France |
  3. |    France / Singapore / UAE |
  4. |                 Switzerland |
  5. |                  Spain / US |
     |-----------------------------|
  6. |                       Italy |
  7. |                 Switzerland |
  8. |                      France |
  9. |                 Netherlands |
 10. |                          UK |
     |-----------------------------|
 11. | FR / GB / DE / ES / IT / PL |
     +-----------------------------+
I want to generate a new variable, say, home_country by keeping only the first country in the country variable i.e. starting from "/", delete everything. For example, for observation 1, 2, and 3 home_country will be UK, France, and France respectively.