Replace the substring

Replace the substring. Given a string, replace all occurrences of the number ‘1’ with the word ‘one’.

Test Case Input (String) Expected Output
1 1 apple and 1 banana one apple and one banana
2 I have 1 dog and 1 cat I have one dog and one cat
3 1 is a number one is a number