
    Th                     z    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                          yy)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                 $    | j                  |      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     T/opt/server/standalone/crm/venv/lib/python3.12/site-packages/phonenumbers/re_util.pyr   r      s       ((    c                     t        j                  d| j                  z  | j                        }|j	                  |      }|r|j                         t        |      k  rd}|S )r   z^(?:%s)$N)recompiler   flagsmatchendlen)r   r	   grouped_patternms       r
   r   r   %   sQ     **Z'//%A7==Q!!&)3v;& Ar   __main__)__doc__r   sysversion_infor   __name__doctesttestmod r   r
   <module>r      sH   . 
 
v) zGOO r   