Extract the phone number
Submissions: 886   Accuracy:

23.69%

  Difficulty: Basic   Marks: 1

You are given a string that contains, in addition to words, a phone number. The phone number is of the format +dd-ddddddddddd. Here d represents a digit. Your task is to extract the phone number from the string and print it.

Input:
The first line of input contains an integer T denoting the number of test

cases. T test cases follow. Each test case contains a single line of string.

Output:
Print the phone number.

Constraints:
1<=T<=100

Example:

Input:
2
Call me +91-90549385612.
The number is +24-01087860699

Output:
+91-90549385612
+24-01087860699

Note: See that the leading zero in +24-01087860699 is also included. Also, every string contains exactly one phone number.

 

** For More Input/Output Examples Use 'Expected Output' option **

Contributor: Ankit Sharma
Author: Soul_xhacker


If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.



Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.


to report an issue on this page.