Ad
  • Custom User Avatar

    Thanks for the tips @CrazyMerlyn. Finally got it :)

  • Custom User Avatar

    When there is no match in a string, the match function returns null.
    Since null doesn't have the length property, your code throws the error when the string has no non-whitespace characters. Note that your check only works for empty strings, not for strings which constitute entirely of spaces.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution