Phones without 9

Report a typo

Write a program that searches a text for all phone numbers that do not contain the digit 9. Numbers can be in one of these formats: XXX-XXX-XXXX, (XXX)-XXX-XXXX, (XXX)XXXXXXX, and XXXXXXXXXX.

Print the search results one per line.

Sample Input 1:

Phone 1: 123-123-1234. Phone 2: 9991234567. Phone 3: (887)6523456. Phone 4: (988)-745-9821

Sample Output 1:

123-123-1234
(887)6523456
Write a program in Kotlin
fun main() {
// write your code here

}
___

Create a free account to access the full topic