# Solution by spuelrich ## Task 1: Counter Integers You are given a string containing only lower case English letters and digits. Write a script to replace every non-digit character with a space and then return all the distinct integers left. Example 1 Input: $str = "the1weekly2challenge2" Output: 1, 2 2 is appeared twice, so we count it one only. Example 2 Input: $str = "go21od1lu5c7k" Output: 21, 1, 5, 7 Example 3 Input: $str = "4p3e2r1l" Output: 4, 3, 2, 1 ## Task 2: Nice String You are given a string made up of lower and upper case English letters only. Write a script to return the longest substring of the give string which is nice. A string is nice if, for every letter of the alphabet that the string contains, it appears both in uppercase and lowercase. Example 1 Input: $str = "YaaAho" Output: "aaA" Example 2 Input: $str = "cC" Output: "cC" Example 3 Input: $str = "A" Output: "" No nice string found.