Kev 69 Posted June 5, 2013 Report Share Posted June 5, 2013 Hi all, Let's say I have a variable set as: www.today.com,email@address.com,Kevin How would you go about counting the number of commas present in that variable? I'd simply need a result such as in the example above, of 2. Thanks,Kev Quote Link to post Share on other sites
ds062692 19 Posted June 5, 2013 Report Share Posted June 5, 2013 (edited) There must be something more elegant but I came up with this. clear list(%commas) add list to list(%commas, $find regular expression(#variable, ","), "Don\'t Delete", "Global") set(#number of commas, $list total(%commas), "Global") Edited June 5, 2013 by ds062692 Quote Link to post Share on other sites
Kev 69 Posted June 5, 2013 Author Report Share Posted June 5, 2013 Works perfectly, thank you! 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.