-1
string = "bonjor hello how are you you you";

Can anybody provide me with the code to count how many times the word you is within the string? I just cant get it.

Greatly appreciate any help!

skaffman
  • 390,936
  • 96
  • 800
  • 764
Sam O
  • 11

1 Answers1

1

hey check these and let me know if still have any doubt

(def data "bonjor hello how are you you you")    
(count (re-seq #"you" data))

check documentation of re-seq and count for detail.

detailed documentation available here:

Grimoire and clojure docs

piyushmandovra
  • 4,001
  • 3
  • 18
  • 30