Ad
  • Custom User Avatar

    It should throw an error if no subs are performed

  • Default User Avatar

    No need to handle double spaces.

    The regular expression (WUB)+ does not match WUB but as many as possible consecutives WUB (because of +).

    For example, in the string STARTWUBWUBWUBBEND, a unique match is detected (WUBWUBWUB) and replaced by a unique space.

    Hope this helps.

  • Default User Avatar

    The description says to return first five elements only.