Pattern Extractor
By providing a sequence of characters, the program will extract its
known pattern.
Example 1:
Input: hellohellohello
Output: hello, repeated 3 times
Example 2:
Input: hellobye, repeated 1 time
Output: hellobye
Example 3:
Input: hellohellobye
Output: hellohellobye, repeated 1 time
Try it for yourself!