6 kyu

Count words

Description
Loading description...
Strings
Regular Expressions
Fundamentals
  • Please sign in or sign up to leave a comment.
  • ahmet_popaj Avatar

    Very interesting challenge, congratulations for the kata.

  • hobovsky Avatar

    This kata is a subject to deduplication process here: https://github.com/codewars/content-issues/issues/131.
    Please join the discussion to help us identify duplicate kata and retire them.

  • user1430804 Avatar

    Good one !

  • TotalyHuman3842 Avatar

    This comment has been hidden.

  • Giacomor Avatar

    looks like there's an error in JS test: if i inlclude "upon" in the removal list the test fails. Removing "upon" from the list of words to exlude it works.

    Please fix, it was very frustrating

  • SUSREE64 Avatar

    I struggled a lot to just pass one test case which was giving one number count difference. Finally I found, that "upon" should not be part of this list of removals. once I removed this from the removal list it passed all the tests.

    "Kate doesn't like some of words and doesn't count them. Words to be excluded are "a", "the", "on", "at", "of", "upon", "in" and "as", case-insensitive.

  • SalvaHH Avatar

    I completed the Kata for all tests. I get an error only on "Second long text block". How is it possible?

  • EdenEcho Avatar

    This comment has been hidden.

  • pH77 Avatar

    This comment has been hidden.

  • farhanaditya Avatar

    JavaScript translation kumited. Feel free to check :)

  • farhanaditya Avatar

    Nice kata to practice regex.

  • wilhelmmi Avatar

    This comment has been hidden.

  • FArekkusu Avatar

    No random tests.

  • thefern Avatar

    This comment has been hidden.

  • smepple Avatar

    Nice one. Ruby translation kumited.

  • zebulan Avatar

    It seems very vague what your criteria for a word is. I think you could show more examples of proper words vs improper words.

    • Does that mean '123abc' is a word since 'Really2374239847' and 'user5453' are words too? Does a word have to start with alphabetic characters?
    • How about '%^&abc!@#'? One word? No word? Can a word be in between non-alphabetic characters? Does that count as breaking the sequence?
    • Is 'slow-moving' one word, two words or not a word at all? Is that an example of breaking the sequence of alphabetic characters?
    • What about 'abc123abc123abc'? Three words? One word? No word? This may be an example of breaking your "non-breaking sequence" rule?
    • 'goodbye?' is that one word? no word? How to deal with punctuation at the end or the middle like "I'd", one word? two words? no word?

    Even if you just added a list of the matches that equal 115 for Example #2, that would answer a lot of my questions just by looking at them.

    Counting words is simple. Knowing what to count is the issue for me.

    Thanks!