Hello everyone,
It has been some time since I have tried to count the occurrences of the word 'and' within each observation, but regrettably, I have not yet found the command to achieve this. I am working with a variable that contains a list of corporate positions, and my objective is to determine how many times the word 'and' appears within the titles of these positions. I would be very grateful if you could advise me with the code:
Below, please find a snap of the variable:
It has been some time since I have tried to count the occurrences of the word 'and' within each observation, but regrettably, I have not yet found the command to achieve this. I am working with a variable that contains a list of corporate positions, and my objective is to determine how many times the word 'and' appears within the titles of these positions. I would be very grateful if you could advise me with the code:
Below, please find a snap of the variable:
Code:
* Example generated by -dataex-. For more info, type help dataex clear input str250 Positions "" "" "" "" "chairman AND president and CEO" "executive vp & chief finance officer" "president & CEO" "president & chief operating officer" "senior vp; president-Integrated Solutions Group" "vp-worldwide operations" "" "" "" "" "" "" "chairman, president & CEO" "executive vp & chief finance officer" "vp & chief marketing officer" "vp; president-software systems" "vp; president-systems integration" "" "" "chairman, president & CEO" "president & CEO" "senior vp-global sales, marketing and customer service" "vp; president-IP cable business unit" "vp; president-connectivity business unit" "vp; president-systems integration and software systems business unit" "vp; president-wireline business unit" "" "" "president and CEO and CFO" "vp & chief finance officer" "vp; president-global connectivity solutions" "vp; president-global connectivity solutions" "vp; president-professional services" "vp; president-wireless" "vp; president-wireless and wireline" "" "" "president & CEO" "vp & chief finance officer" "vp; president-global connectivity solutions" "vp; president-professional services" "vp; president-wireless and wireline" "president & CEO" "vp & chief finance officer" "vp, general counsel & secretary" "vp; president-global connectivity solutions" "vp;president-professional services" "" "president & CEO" "vp & chief administrative officer" "vp & chief finance officer" "vp & chief finance officer" "vp, general counsel & secretary" "vp; president-global connectivity solutions" "" "" "president & CEO" "vp & chief administrative officer" "vp & chief finance officer" "vp, general counsel & secretary" "vp; president-global connectivity solutions" "" "Vice President, Secretary and General Counsel" "chairman, president & CEO" "vp & chief administrative officer" "vp & chief finance officer" "vp & president-network solutions" "vp; president-global connectivity solutions" "Chairman, Chief Executive Officer and President" "Chief Financial Officer and Vice President" "Vice President and President of Global Connectivity Solutions Business Unit" "Vice President of Global Go-to-Market" "Vice President, General Counsel and Secretary" "" "" "" "" "chairman & CEO" "executive vp; executive vp-customer service-American" "executive vp; executive vp-marketing & planning-American" "executive vp; executive vp-operations-American" "vice chairman" "" "" "" "chairman & CEO" "executive vp; executive vp-customer service-American" "executive vp; executive vp-marketing & planning-American" "president & chief operating officer" "senior vp & general counsel" "senior vp-government affairs-American" "vice chairman" "" "" "chairman & CEO" "executive vp; executive vp-marketing-American" end
Comment