2019-11-06 22:21:11 +01:00
|
|
|
No 555
|
|
|
|
======
|
|
|
|
|
|
|
|
Note: this task is only for students of "Formal languages and
|
|
|
|
complexity theory" taught in English.
|
|
|
|
|
|
|
|
[Your program should read lines from the standard input and check each
|
|
|
|
line separately (without end-of-line character). Please use regular
|
|
|
|
expressions as much as possible (in particular, try not to use
|
|
|
|
logical operators outside the regeular expression). If it is
|
|
|
|
possible, use just one regular expression.]
|
|
|
|
|
|
|
|
For each string from the standard input, check whether it is a 9-digit
|
|
|
|
phone number (format "NNN-NNN-NNN" or "NNN NNN NNN"), not beginning
|
|
|
|
with "555". Write "true"/"false" on the standard output accordingly.
|
|
|
|
|
|
|
|
POINTS: 3
|
2019-11-25 15:23:09 +01:00
|
|
|
DEADLINE: 2019-12-05 17:00
|