Zanurkuj w Pythonie/Analiza przypadku: Przetwarzanie numerów telefonów: Różnice pomiędzy wersjami

Usunięta treść Dodana treść
→‎Case study: Parsing Phone Numbers: tłumaczenia nagłówków
Linia 21:
Let's work through developing a solution for phone number parsing. This example shows the first step.
 
'''Przykład 7.10. Odnajdywanie numerów'''
 
>>> phonePattern = re.compile(r'^(\d{3})-(\d{3})-(\d{4})$') #(1)
Linia 33:
# This regular expression is not the final answer, because it doesn't handle a phone number with an extension on the end. For that, you'll need to expand the regular expression.
 
'''Przykład 7.11. Odnajdywanie numeru wewnętrznego'''
 
>>> phonePattern = re.compile(r'^(\d{3})-(\d{3})-(\d{4})-(\d+)$') #(1)