Lombi 34 Posted August 6, 2012 Report Share Posted August 6, 2012 So I have a variable like this: Richard Basehart, Phyllis Kirk, Stephen Elliott, Russell Collins, Richard Hale, Charles Wagenheim, Alan Wells, Tommy Cook, William Pullen, Paul, Lee, Vaso, Kaan, Ali I'd like to remove everything with one word, but keep all two+ word entries. Any ideas? Thanks! Quote Link to post Share on other sites
odeesuba 24 Posted August 7, 2012 Report Share Posted August 7, 2012 This removes all one word except if it happens to be the last one. (Did not have time to add that, sorry) set(#Temp, $replace regular expression("Richard Basehart, Phyllis Kirk, Stephen Elliott, Russell Collins, Richard Hale, Charles Wagenheim, Alan Wells, Tommy Cook, William Pullen, Paul, Lee, Vaso, Kaan, Ali", ",\\s[a-zA-Z]*(?=,)", ""), "Global") Quote Link to post Share on other sites
Lombi 34 Posted August 7, 2012 Author Report Share Posted August 7, 2012 Thank you, odeesuba! Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.