-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
  • 398,947
  • 96
  • 818
  • 769
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,219
  • 3
  • 19
  • 30