
    Eqg                     t    d Z ddlZddlZej        dk    rd Znd Zedk    rddlZ ej                     dS dS )uF  Additional regular expression utilities, to make it easier to sync up
with Java regular expression code.

>>> import re
>>> from .re_util import fullmatch
>>> from .util import u
>>> string = 'abcd'
>>> r1 = re.compile('abcd')
>>> r2 = re.compile('bc')
>>> r3 = re.compile('abc')
>>> fullmatch(r1, string)  # doctest: +ELLIPSIS
<...Match object...>
>>> fullmatch(r2, string)
>>> fullmatch(r3, string)
>>> r = re.compile(r'\d{8}|\d{10,11}')
>>> m = fullmatch(r, '1234567890')
>>> m.end()
10
>>> r = re.compile(u(r'[+＋\d]'), re.UNICODE)
>>> m = fullmatch(r, u('０'))
>>> m.end()
1
    N)      c                 ,    |                      |          S )Try to apply the pattern at the start of the string, returning a match
        object if the whole string matches, or None if no match was found.)	fullmatch)patternstrings     F/var/www/html/env/lib/python3.11/site-packages/phonenumbers/re_util.pyr   r      s       (((    c                     t          j        d| j        z  | j                  }|                    |          }|r'|                                t          |          k     rd}|S )r   z^(?:%s)$N)recompiler   flagsmatchendlen)r   r	   grouped_patternms       r
   r   r   %   s]     *Z'/%A7=QQ!!&)) 	3v;;&& Ar   __main__)__doc__r   sysversion_infor   __name__doctesttestmod r   r
   <module>r      s    . 
			 



v) ) ) )   zNNNGO r   