Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
It should throw an error if no subs are performed
No need to handle double spaces.
The regular expression
(WUB)+
does not matchWUB
but as many as possible consecutivesWUB
(because of+
).For example, in the string
STARTWUBWUBWUBBEND
, a unique match is detected (WUBWUBWUB
) and replaced by a unique space.Hope this helps.
I don't understand how this handles double spaces. Could someone explain, please?