Dec 31
Marc Pinnell Counting occurrences of a string/number
Dec 31, 2014; 16:32
Marc Pinnell
Counting occurrences of a string/number
Looking for something and "elegant" :) Working in Lasso 8.6 for this one...
Given that $myString = '12355893'
How can I easily determine that $myString contains one each of 1, 2, 8 and 9? While having two each of 3 and 5?
The only thing in the docs that even looks close would be:
[Var: 'myRegExp' = (RegExp: -Find='(\\w)(\\w+)', -Replace='\\0', -Input='The quick brown fox', -IgnoreCase)]
[$myRegexp->GroupCount]
But I am having trouble with how it works in this context.
Didn't find anything in LT (not an easy thing to search for) nor TagSwap.
I'm thinking something like (Not real code, I know):
loop(-from: 0, -to: 9)
$curCount = $myString->count(loop_count)
... do something with found count ...
/loop
Any thoughts?
Marc Pinnell
1027 Design
PO Box 990872
Redding, CA 96099-0872
530.941.4706
fax: 866.232.5300
www.1027Design.com
#############################################################
This message is sent to you because you are subscribed to
the mailing list Lasso Lasso@lists.lassosoft.com
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <Lasso-unsubscribe@lists.lassosoft.com>
Send administrative queries to <Lasso-request@lists.lassosoft.com>
Dec 31
deco rior Re: Counting occurrences of a string/number
Dec 31, 2014; 17:41
deco rior
Re: Counting occurrences of a string/number
Dec 31
Marc Pinnell Re: Counting occurrences of a string/number
Dec 31, 2014; 17:18
Marc Pinnell
Re: Counting occurrences of a string/number
Dec 31
Steve Piercy - Website Builder Re: Counting occurrences of a string/number
Dec 31, 2014; 18:24
Steve Piercy - Website Builder
Re: Counting occurrences of a string/number