Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Find word
#1
Is it possible to find out how many times a word appears in a grouping of text?

Example:

test1: hello.
test2: goodbye.
test1: helloo.
test1: hellooo.
test2: goodbyee.

How would I find how many times "test1:" appears.
Taking on Quick Macros one day at a time
#2
Macro
Code:
Copy      Help
str s=
;test1: hello.
;test2: goodbye.
;test1: helloo.
;test1: hellooo.
;test2: goodbyee
str s2="test1"
int i n
rep
,i=findw(s s2 i)
,if(i<0) break
,i+s2.len
,n+1
out n
#3
Perfect, thanks.
Taking on Quick Macros one day at a time


Forum Jump:


Users browsing this thread: 1 Guest(s)