+
    xȇi                        ^ RI H t  ^ RIt^ RIt^ RIt^ RIHt ^ RIHu H	t
 ^ RIt^ RIHtHtHt ^ RIHtHt R tR tR t]P.                  P1                  R	R]P2                  3RRRR]P4                  ]P2                  3.4      ]P.                  P1                  RR
R.4      R 4       4       tR tR tR tR t]P.                  P1                  RR. RO3R. RO3R. RO3R. RO3R. RO3.4      ]P.                  P1                  R]P@                  R
R]P4                  R]P2                  .4      R 4       4       t!R t"R t#]P.                  P1                  RRR.4      ]P.                  P1                  RRR .4      ]P.                  P1                  R!R]P4                  ]P2                  .4      ]P.                  P1                  RR
R.4      R" 4       4       4       4       t$]P.                  P1                  R. RO4      R# 4       t%]P.                  P1                  RRR.4      ]P.                  P1                  RRR .4      ]P.                  P1                  R!R]P4                  ]P2                  .4      ]P.                  P1                  RR
R.4      R$ 4       4       4       4       t&]P.                  P1                  R. RO4      R% 4       t'R& t(R' t)R( t*R) t+R* t,R+ t-]P.                  P1                  R,R^R-R./.4      ]P.                  P1                  R/. RO. RO.4      R0 4       4       t.R1 t/]P.                  P1                  R,R2 R3 RR4 l.4      R5 4       t0]P.                  P1                  R6R7R8R9.3R:R8R9.3R;R8R9.3R<R=R>.3R?R@RA.3.. RORB7      ]P.                  P1                  RCR
R.4      RD 4       4       t1]P.                  P1                  R,. RO4      ]P.                  P1                  RCR
R.4      RE 4       4       t2]P.                  P1                  RFRR.4      RG 4       t3]P.                  P1                  RHRIRJ. RO3RKRJ. RO3.4      ]
Ph                  ! RL4      RM 4       4       t5RN t6RO t7RP t8RQ t9RR t:RS t;]P.                  P1                  RTRR.4      RU 4       t<RV t=RW t>RX t?RY t@RZ tA]P.                  P1                  RR
R.4      R[ 4       tB]P.                  P1                  RR. RO3R. RO3R. RO3R. RO3R. RO3.4      R\ 4       tCR] tDR^ tER_ tFR` tGRa tHRb tI]P.                  P1                  RcRRR
R..RdR
RR..ReR
RR..RfRR
R..RgR
RR..RhR
R
R..RiR
R
R...4      Rj 4       tJ]P.                  P1                  RR. RO3R. RO3R. RO3R. RO3R. RO3.4      Rk 4       tKRl tLRm tMRn tNRo tORp tPRq tQ]P.                  P1                  RrRsRR. RO.RtR
R. RO.ReR
R. RO.RRR. RO.RuRR. RO.RgR
R. RO.RvRR. RO.RwRR. RO.RxR
R. RO.RyR
R. RO.RzR
R. RO.R{R
R. RO..4      R| 4       tR]P.                  P1                  R. RO4      R} 4       tSR~ tTR tUR tV]P.                  P1                  RR. R-.. . .3R. R... . .3RR-R-.. R-.. .3RR-R-.R-.. . .3R. R.. . .3.4      R 4       tWR tXR tYR tZR t[]P.                  P1                  RR]P                  ! R
]
Ph                  ! RL4      R7      .4      R 4       t]R t^R t_R# )    )datetimeN)lib)SeriesStringDtype_testing)_convert_na_valueis_object_or_nan_string_dtypec           	      	   \         P                  ! R \         P                  RRR.\         P                  R7      p\	        WR7      pRpVP
                  P                  V4      pV R8X  d   \	        . RO\        R7      pMY\        V 4      '       d   R	MR
p\	        \         P                  ! R\         P                  RRR.\         P                  R7      VR7      p\        P                  ! W44       VP
                  P                  VRR7      pV R8X  d   \	        . RO\        R7      pMD\	        \         P                  ! R\         P                  RRR.\         P                  R7      XR7      p\        P                  ! W44       \	        \         P                  ! . RO\        R7      V R7      pVP
                  P                  V4      p\        V 4      '       d   \         P                  MR
p\	        \         P                  ! . RO4      VR7      p\        P                  ! W44       \	        \         P                  ! . RO\        R7      V R7      pVP
                  P                  RRR7      p\	        \         P                  ! . RO4      VR7      p\        P                  ! W44       VP
                  P                  R RRR7      p\	        \         P                  ! . RO4      VR7      p\        P                  ! W44       \	        \         P                  ! R \         P                  RR.\         P                  R7      V R7      pRpVP
                  P                  V4      pV R8X  d   \	        . RO\        R7      pMX\        V 4      '       d   R	MR
p\	        \         P                  ! R\         P                  RR.\         P                  R7      VR7      p\        P                  ! W44       VP
                  P                  VRR7      p\        V 4      '       d   \         P                  MR
p\	        \         P                  ! . RO4      VR7      p\        P                  ! W44       \	        \         P                  ! . RO\         P                  R7      V R7      pVP
                  P                  V4      p\	        \         P                  ! . RO4      VR7      p\        P                  ! W44       R# )foofooommm__foommm_zfoommm[_]+bardtypezmmm[_]+strFTobjectbooleanregexzFOO|mmmcase)r   r   naN)FFTTF)FFFFT)r   xyzr   r   )FFTT)FooxYzfOOomMm__fOoMMM_)TFTTTFTF)nparraynanobject_r   r   containsboolr	   tmassert_series_equalr   bool_)any_string_dtypevaluespatresultexpectedexpected_dtypes   &     v/Users/max/.openclaw/workspace/postharvest/venv/lib/python3.14/site-packages/pandas/tests/strings/test_find_replace.pytest_containsr/      s   XX	@

F F3F
CZZ  %F5 ;4H 66FGGHY 	 HHeRVVT47rzzJ 

 6,ZZ  E 2F5 <DIHHeRVVUE48

K 
 6,
7vFF ZZ  %F12BCC  bhh9:.QH6, 
7vFF
 ZZ   7Fbhh89PH6, ZZ  e% @Fbhh9:.QH6, 
%8

KF CZZ  %F5 4DA 66FGGHY 	 HHeRVVT40

C 
 6,ZZ   /F12BCC  bhh9:.QH6,
7rzzJF ZZ  %Fbhh9:.QH6,    c                     \        \        P                  ! R \        P                  RR\        P
                  ! 4       RR^R.	\        R7      4      p V P                  P                  R4      p\        \        P                  ! R\        P                  R\        P                  \        P                  RR\        P                  \        P                  .	\        P                  R7      4      p\        P                  ! W4       R# )	abTr   N       @r   oF)r   r   r    r!   r   todayr   r   r#   r"   r%   r&   mixedr+   r,   s      r.   test_contains_object_mixedr9   x   s    
"&&#tX^^%5udAsK	
E YY$F
BFFE2662664rvvrvvN**	
H 6,r0   c                     \        R RRR \        P                  .RR7      p V P                  P	                  R RR7      p\        . R	O4      p\
        P                  ! W4       V P                  P	                  R RR7      p\        . R
O4      p\
        P                  ! W4       \        R RRR \        P                  .4      p V P                  P	                  R RR7      p\        . R	O4      p\
        P                  ! W4       V P                  P	                  R RR7      p\        . R
O4      p\
        P                  ! W4       R# )r2   r3   ccategoryr   Tr   FN)TFFTT)TFFTF)r   r   r!   r   r#   r%   r&   )r)   r+   r,   s      r.   *test_contains_na_kwarg_for_object_categoryr=      s    S#sC0
CFZZ   .F67H6,ZZ   /F78H6, S#sC01FZZ   .F67H6,ZZ   /F78H6,r0   zna, expectedTFr   c                    \        R RRR \        P                  .V R7      pVR9   dX   VRJdR   RV 2p\        P                  ! \
        VR7      ;_uu_ 4        VP                  P                  R WR7       RRR4       R# VP                  P                  R WR7      p\        R	RRR	V.R
R7      p\        P                  ! Wb4       R#   + '       g   i     R# ; i)r2   r3   r;   r   Fz4na must be None, pd.NA, np.nan, True, or False; got match)r   r   NTr   )r      )
r   r   r!   pytestraises
ValueErrorr   r#   r%   r&   )nullable_string_dtyper   r,   r   r)   msgr+   s   &&&&   r.   0test_contains_na_kwarg_for_nullable_string_dtyperG      s    " S#sC08MNF	V|%DRDI]]:S11JJ8 21 $$SR$=4tX>iP
v0 211s   CC	c                    \        R RRRRR\        P                  RRR.
V R	7      pVP                  P	                  R
4      pV R8X  d
   \
        pRpM%\        V 4      '       d   RMRp\        P                  p\        RRRRRRVRRR.
VR	7      p\        P                  ! W%4       VP                  P	                  R
RR7      p\        RRRRRRVRRR.
VR	7      p\        P                  ! W%4       VP                  P	                  R4      p\        RRRRRRVRRR.
VR	7      p\        P                  ! W%4       VP                  P	                  R4      p\        RRRRRRVRRR.
VR	7      p\        P                  ! W%4       VP                  P	                  RRR7      p\        RRRRRRVRRR.
VR	7      p\        P                  ! W%4       R# )ABCAabaBaca CABAdogcatr   r2   r   Fr   r   Tr   AabaN)	r   r   r!   r   r#   r$   r	   r%   r&   )r(   sr+   r-   na_valuer,   s   &     r.   test_contains_moarrV      s   	c3BFFFE5I	A
 UU^^C F5  66FGGHY 	 66	udD%5%NH 6,UU^^Ce^,F	ueT4$tLH 6,UU^^D!F	udE5(E5%PH 6,UU^^D!F	udE5(E5%PH 6,UU^^Du^-F	udD%4NH 6,r0   c                    \        \        P                  \        P                  \        P                  .V R 7      pVP                  P	                  RRR7      p\        V 4      '       d   \        P                  MRp\        . ROVR 7      p\        P                  ! W$4       VP                  P	                  RRR7      p\        . ROVR 7      p\        P                  ! W$4       Rp\        P                  ! \        VR7      ;_uu_ 4        VP                  P	                  RRR7       RRR4       VP                  P	                  R4      pV R	8X  d   \        . RO\        R 7      pMO\        V 4      '       d   R
MRp\        \        P                  \        P                  \        P                  .VR 7      p\        P                  ! W$4       R#   + '       g   i     L; i)r   r   Fr   r   Tz7na must be None, pd.NA, np.nan, True, or False; got foor?   Nr   r   FFF)TTT)r   r   r!   r   r#   r	   r'   r%   r&   rB   rC   rD   r$   )r(   rT   r+   r-   r,   rF   s   &     r.   test_contains_nanrY      sF   '/?@AUU^^Ee^,F12BCC  +>BH6,UU^^Ed^+F(?H6,
CC	z	-	-	u' 
. UU^^E"F5 /t< 66FGGHY 	 2662662662.I6, 
.	-s   GG	c                 *   \        V 4      '       d   \        P                  MR p\        . ROV R7      p\        P
                  ! R4      pVP                  P                  V4      p\        . ROVR7      p\        P                  ! WE4       V R8X  dU   V P                  R8X  dD   VP                  P                  VRR7      p\        . ROVR7      p\        P                  ! WE4       MJ\        P                  ! \        RR7      ;_uu_ 4        VP                  P                  VRR7       R	R	R	4       \        P
                  ! R\        P                  R
7      pVP                  P                  V4      p\        . ROVR7      p\        P                  ! WE4       \        P                  ! \        RR7      ;_uu_ 4        VP                  P                  V\        P                  R
7       R	R	R	4       R	#   + '       g   i     L; i  + '       g   i     R	# ; i)r   r   zba.Fstringpyarrowr   5cannot process flags argument with a compiled patternr?   Nflags)r   barBazFTFFTT)r	   r   r'   r   recompiler   r#   r%   r&   storagerB   rC   rD   
IGNORECASEr(   r-   serr*   r+   r,   s   &     r.   test_contains_compiled_regexrj     s    22BCC  &.>
?C
**U
CWWc"F*.AH6, 8#(8(@(@I(M!!#E!2-^D
v0]]U
 
 GGSu-

 **U"--
0CWWc"F)@H6, 
Q
 
 	BMM2
 

 

 
 
s   G.8,H.G>	H	c                    \        V 4      '       d   \        P                  MR p\        . ROV R7      p\        P
                  ! R4      pVP                  P                  V4      p\        . ROVR7      p\        P                  ! WE4       \        P
                  ! R\        P                  R7      pVP                  P                  V4      p\        . ROVR7      p\        P                  ! WE4       \        P
                  ! R\        P                  \        P                  ,          R7      pVP                  P                  V4      p\        . ROVR7      p\        P                  ! WE4       R# )	r   r   z^bar^   N)foobarzfoo
barra   rX   rb   rc   )r	   r   r'   r   rd   re   r   r#   r%   r&   	MULTILINErg   rh   s   &     r.   "test_contains_compiled_regex_flagsrn   5  s     22BCC  .6F
GC
**U
CWWc"F+>BH6,
**U",,
/CWWc"F*.AH6,
**U",,">
?CWWc"F)@H6,r0   zpat, expected_dataa(?=b)(?<=a)ba(?!b)(?<!b)aabr   c                    V R 8X  d   \        V\        4      '       g   R pM#\        V 4      '       d   \        P                  MRpV R 8X  dK   V\
        P                  J g   \        P                  ! V4      '       d   V\        P                  Jd   RpMeTpMbV\
        P                  J g   \        P                  ! V4      '       d1   V R8X  d   RpM(V R8X  d   \        P                  pM\        RV  24      hTpVP                  4       pVP                  V4       \        . R
OV R7      pVP                  P                  VRVR	7      p\        W$R7      p\         P"                  ! Wx4       R# )r   r   Nr   Fr[   zUnrecognized string dtype r   T)r   r   aars   rS   bbN)
isinstancer$   r	   r   r'   r   
no_defaultpdisnaNArD   copyappendr   r   r#   r%   r&   )	r(   r*   expected_datar   r-   	na_resultri   r+   r,   s	   &&&&     r.   test_contains_lookaroundsr   M  s    8#Jr4,@,@! 66FGGBHHY 	 8##.. BGGBKKRruu_II	s~~	u$I)I9:J9KLMM	!&&(M#
/7G
HCWWc"5Fm:H6,r0   c                 ~   \        V 4      '       d   \        P                  MR p\        . ROV R7      pVP                  P                  R4      pV R8X  d"   V P                  R8X  d   \        . ROVR7      pM\        . ROVR7      p\        P                  ! W44       VP                  P                  R4      p\        . ROVR7      p\        P                  ! W44       \        RR	P                  R
4      RRRR.V R7      pVP                  P                  R4      p\        . ROVR7      p\        P                  ! W44       VP                  P                  R4      p\        . ROVR7      p\        P                  ! W44       VP                  P                  R4      p\        . ROVR7      p\        P                  ! W44       R# )r   r`   barsbar
r   bar$r[   r\   bar\Zzbar{}\bar\\Zzbar\\\Zzbar\\\\ZNbazr`   r   r   FTFFFTFT)FFTFFF)FTFFFF)FFFTFF)
r	   r   r'   r   r   r#   rf   r%   r&   formatr(   r-   ri   r+   r,   s   &    r.   test_contains_end_of_stringr   w  sk    22BCC  08H
IC WWf%F8#(8(@(@I(M5^L 4NK6, WWh'F1HH6, 	%xFGLC
 WWi(F?~VH6,WWj)F?~VH6,WWk*F?~VH6,r0   c           	         \        R \        P                  RRR\        P                  R.V R7      pRp\        P                  ! \
        VR7      ;_uu_ 4        VP                  P                  RR	R
7       RRR4       \        P                  ! \
        VR7      ;_uu_ 4        VP                  P                  RR	R
7       RRR4       R#   + '       g   i     L\; i  + '       g   i     R# ; i)omfoo_nomnombar_foor   r   z7na must be None, pd.NA, np.nan, True, or False; got bazr?   kapowr   r   Nr`   )	r   r   r!   rB   rC   rD   r   
startswithendswith)r(   ri   rF   s   &  r.   $test_startswith_endswith_validate_nar     s    
	rvvy%BFFEBC DC	z	-	-7u- 
.	z	-	-5) 
.	- 
.	-	-	-	-s   C	!C	C	C-	r*   r   r   r   r<   
null_valuec                 8   \        R VRRRVR.VR7      pVP                  P                  V 4      p\        R\        P                  RRR\        P                  R.4      pVR8X  d'   V\
        P                  J d   VP                  V4      pMQVR8X  d   Vf   R	WwP                  4       &   M3V'       d,   VR
8X  d%   VP                  R4      P                  \        4      p\        P                  ! Wg4       VP                  P                  WR7      p\        RVRRRVR.4      p\        P                  ! Wg4       \        P                  ! R\        P                  RR\        P                  ! 4       RR	^R.	\        P                   R7      p\        V4      P                  P                  R4      p	\        R\        P                  R\        P                  \        P                  RR	\        P                  \        P                  .	4      p
\        P                  ! W4       R	# r   r   r   r   r   r   FTr   Nr<   r   r2   r3   r4   f)r   r   r   r   r!   rz   r|   fillnar{   astyper$   r%   r&   r    r   r6   r"   r*   r   r   r   using_infer_stringr)   r+   expr8   rsxps   &&&&&      r.   test_startswithr     s    	z9eY
EJF
 ZZ""3'F
%ueRVVTB
CCZ2550jj$	(	z1HHJ	 3jj&&t,6'ZZ""3".F
%T5%T:
;C6' HH	bffc4!15$3GjjE 
			%	%c	*B	rvvrvvtT266266R	SB2"r0   c                    \        . R
OV R7      pVP                  P                  RVR7      p\        V 4      '       d   Vf   \        M\
        MRpV R8X  d   \
        pVf   Rp\        RVR	RRVR	RR.	VR7      p\        P                  ! W54       VP                  P                  RVR7      p\        RVRRRVRRR	.	VR7      p\        P                  ! W54       R# r   Nr   rege.r   r   r   r   FT)	r   Nr   r   r   Nr   r   r   )r   r   r   r	   r   r$   r%   r&   r(   r   r)   r+   r-   r   s   &&    r.   test_startswith_string_dtyper     s    PF ZZ""5R"0F ))9:: :4 
 5 :B
	D%D%?~C 6'ZZ""7r"2F
	E5%UE4@C 6'r0   c                 $   \        R VRRRVR.VR7      pVP                  P                  V 4      p\        R\        P                  RRR\        P                  R.4      pVR8X  d'   V\
        P                  J d   VP                  V4      pMQVR8X  d   Vf   R	WwP                  4       &   M3V'       d,   VR
8X  d%   VP                  R4      P                  \        4      p\        P                  ! Wg4       VP                  P                  WR7      p\        RVRRRVR.4      p\        P                  ! Wg4       \        P                  ! R\        P                  RR\        P                  ! 4       RR	^R.	\         R7      p\        V4      P                  P                  R4      p	\        R\        P                  R\        P                  \        P                  RR	\        P                  \        P                  .	4      p
\        P                  ! W4       R	# r   )r   r   r   r   r!   rz   r|   r   r{   r   r$   r%   r&   r    r   r6   r   r   s   &&&&&      r.   test_endswithr     s    	z9eY
EJF
 ZZ  %F
%tRVVTB
CCZ2550jj$	(	z1HHJ	 3jj&&t,6'ZZ   ,F
%UE4T:
;C6' HH	bffc4!15$3GE 
			#	#C	(B	rvvrvvudBFFBFFS	TB2"r0   c                    \        . R
OV R7      pVP                  P                  RVR7      p\        V 4      '       d   Vf   \        M\
        MRpV R8X  d   \
        pVf   Rp\        RVRRR	VR	RR.	VR7      p\        P                  ! W54       VP                  P                  RVR7      p\        RVRRRVRRR	.	VR7      p\        P                  ! W54       R# r   )r   r   r   r	   r   r$   r%   r&   r   s   &&    r.   test_endswith_string_dtyper     s    PF ZZ  2 .F ))9:: :4 
 5 :B
	E5$D%?~C 6'ZZ  R 0F
	E5%UE4@C 6'r0   c                     \        . R
ORR7      pRp\        P                  ! \        VR7      ;_uu_ 4        VP                  P                  R RRR/R R7       R	R	R	4       R	#   + '       g   i     R	# ; i)rI   my_messy_coldatanamez,repl cannot be used when pat is a dictionaryr?   r2   rJ   r3   )r*   replN)rI   B_junkC_gunkr   rB   rC   rD   r   replace)r(   seriesrF   s   &  r.   test_replace_dict_invalidr   >  sT    2HF
8C	z	-	-

S#s3#> 
.	-	-	-s   "A""A3	c                     \        . RORR7      pVP                  P                  R RRR/R7      p\        . R	ORR7      p\        P                  ! W#4       R# )
rI   rJ   r   r   r2   r3   )r*   N)rI   rJ   rK   )r2   r3   rK   r   r   r   r%   r&   )r(   r   
new_seriesr,   s   &   r.   test_replace_dictr   G  sH    ~>F##c3(<#=J?@H:0r0   c                     \        R \        P                  .V R7      pVP                  P	                  RRRR7      p\        R\        P                  .V R7      p\
        P                  ! W#4       R# )fooBAD__barBADr   BAD[_]*rN   Tr   rl   Nr   r   r!   r   r   r%   r&   r(   ri   r+   r,   s   &   r.   test_replacer   O  sU    
"BFF+3C
DCWW__Y$_7Fx(0@AH6,r0   c                    \        R \        P                  .V R7      p\        R\        P                  .V R7      pVP                  P	                  RR^RR7      p\
        P                  ! W24       \        R\        P                  .V R7      pVP                  P	                  RR^R	R7      p\
        P                  ! W24       R
# )r   r   	foobarBADr   rN   Tnr   foo__barBADBADFNr   r(   ri   r,   r+   s   &   r.   test_replace_max_replacementsr   W  s    
"BFF+3C
DC{BFF+3CDHWW__Yat_<F6,}bff-5EFHWW__UB!5_9F6,r0   c                     \        R \        P                  RR\        P                  ! 4       RR^R.	4      p \        V 4      P
                  P                  RRRR7      p\        R	\        P                  R
\        P                  \        P                  RR\        P                  \        P                  .	\        R7      p\        P                  ! W4       R# )aBADbBADTfooBADNr4   r   rN   r   r2   r3   r   r   )
r   r   r!   r   r6   r   r   r   r%   r&   ri   r+   r,   s      r.   test_replace_mixed_objectr   c  s    
	x~~'74CPC C[__$$Y$$?F	bffc2662665$GvH 6,r0   c                     \        R P                  R4      .V R7      p\        RP                  R4      .V R7      pVP                  P                  RR\        P
                  RR7      p\        P                  ! W24       R# )	   abcd,àutf-8r      abcd, à(?<=\w),(?=\w), Tr_   r   N)r   decoder   r   rd   UNICODEr%   r&   r   s   &   r.   test_replace_unicoder   n  sg    
"))'23;K
LC(//89AQRHWW__.BJJd_SF6,r0   r   r2   r3   r   c                     R pV! W0R7      p\         P                  ! \        VR7      ;_uu_ 4        VP                  P	                  RV4       RRR4       R#   + '       g   i     R# ; i)z!repl must be a string or callabler   r?   r2   N)rB   rC   	TypeErrorr   r   )r(   index_or_seriesr   r   rF   objs   &&&&  r.   #test_replace_wrong_repl_type_raisesr   u  sE     .C
$
7C	y	,	,T" 
-	,	,	,s   AA(	c                     \        R \        P                  .V R7      pR pVP                  P	                  RV^RR7      p\        R\        P                  .V R7      p\
        P                  ! W44       R# )r   r   c                 @    V P                  ^ 4      P                  4       # r   groupswapcasems   &r.   <lambda>'test_replace_callable.<locals>.<lambda>      QWWQZ((*r0   [a-z][A-Z]{2}Tr   foObaD__baRbaDNr   )r(   ri   r   r+   r,   s   &    r.   test_replace_callabler     s_    
"BFF+3C
DC +DWW___dat_DF'08HIH6,r0   c                      R # N r   r0   r.   r   r     s    Tr0   c                     R # r   r   )r   xs   &&r.   r   r     s    r0   c                     R # r   r   )r   r   ys   &&&r.   r   r     s    4r0   c                    \        R \        P                  .V R7      pRp\        P                  ! \
        VR7      ;_uu_ 4        VP                  P                  RVRR7       RRR4       R#   + '       g   i     R# ; i)r   r   zO((takes)|(missing)) (?(2)from \d+ to )?\d+ (?(3)required )positional arguments?r?   r2   Tr   N)r   r   r!   rB   rC   r   r   r   )r(   r   r)   rF   s   &&  r.   test_replace_callable_raisesr     s`    
 %rvv.6FGF	0  
y	,	,

3D1 
-	,	,	,s   A--A>	zrepl, expected_listz\g<three> \g<two> \g<one>zThree Two OnezBaz Bar Fooz\3 \2 \1z\g<3> \g<2> \g<1>z\g<2>0Two0Bar0z	\g<2>0 \1zTwo0 OnezBar0 Foo)idsuse_compilec                     \        R R.V R7      pRpV'       d   \        P                  ! V4      pVP                  P	                  WRRR7      p\        W0R7      p\
        P                  ! Wg4       R# )One Two ThreeFoo Bar Bazr   ((?P<one>\w+) (?P<two>\w+) (?P<three>\w+)Tr   N)r   rd   re   r   r   r%   r&   )r(   r   r   expected_listri   patternr+   r,   s   &&&&    r.   $test_replace_named_groups_regex_swapr    s[    J /=19I
JC9G**W%WW__W$_7Fm<H6,r0   c                 `   V'       g   R V9  d   \        V \        4      '       do   V P                  R8X  d^   VR8X  d2   \        P                  P                  RR7      pVP                  V4       \        P                  ! R4      pVP                  pRpM\        P                  pRpRpV'       d   \        P                  ! V4      p\        RR	.V R
7      p	\        P                  ! WgR7      ;_uu_ 4        V	P                  P                  WRR7       RRR4       R#   + '       g   i     R# ; i)z\gr\   \20z%PyArrow interprets as group + literal)reasonz(only has \d parenthesized subexpressionszinvalid group referencer   r   r   r   r?   Tr   N)rx   r   rf   rB   markxfailapplymarkerimportorskipArrowInvalidrd   errorre   r   rC   r   r   )
r(   r   r   requestr  pa
error_type	error_msgr  ri   s
   &&&&      r.   2test_replace_named_groups_regex_swap_expected_failr    s     '55$$	1 6>;;$$,S$TD%  +__
?	XX
-	9G**W%
/=19I
JC	z	3	3T2 
4	3	3	3s   4DD-	zpattern, replc                     \        R R.V R7      pVP                  P                  WRR7      p\        RR.V R7      p\        P                  ! WE4       R# )r   r   r   Tr   r   r   Nr   )pyarrow_string_dtyper  r   ri   r+   r,   s   &&&   r.   'test_pyarrow_ambiguous_group_referencesr    sL     /=19M
NCWW__W$_7Fvv&.BCH6,r0   zpattern, repl, expected_listz\[(?P<one>\d+)\]z(\1)z	\[(\d+)\]r\   c                     \        . RO4      P                  RR7      pVP                  P                  WRR7      p\        V4      P                  RR7      p\        P
                  ! WE4       R# )
var.one[0]r\   )dtype_backendTr   N)r  z
var.two[1]zvar.three[2])r   convert_dtypesr   r   r%   r&   )r  r   r   ri   r+   r,   s   &&&   r.   &test_pyarrow_backend_group_replacementr    sa    " =
>
M
M N C WW__W$_7Fm$33)3LH6,r0   c                     \        R \        P                  .V R7      pRpR pVP                  P	                  W#RR7      p\        R\        P                  .V R7      p\
        P                  ! WE4       R# )r   r   z,(?P<first>\w+) (?P<middle>\w+) (?P<last>\w+)c                 @    V P                  R 4      P                  4       # )middler   r   s   &r.   r   4test_replace_callable_named_groups.<locals>.<lambda>  s    QWWX&//1r0   Tr   bARNr   )r(   ri   r*   r   r+   r,   s   &     r.   "test_replace_callable_named_groupsr    s[    
-(0@
AC
9C1DWW__Sd_3Fubffo-=>H6,r0   c                    \        R \        P                  .V R7      p\        P                  ! R4      pVP
                  P                  VRRR7      p\        R\        P                  .V R7      p\        P                  ! W44       VP
                  P                  VR^RR7      p\        R\        P                  .V R7      p\        P                  ! W44       R	# )
r   r   BAD_*rN   Tr   rl   r   r   N	r   r   r!   rd   re   r   r   r%   r&   )r(   ri   r*   r+   r,   s   &    r.   test_replace_compiled_regexr"  $  s    
"BFF+3C
DC **X
CWW__S"D_1Fx(0@AH6,WW__S"_6F{BFF+3CDH6,r0   c                     \         P                  ! R 4      p \        R\        P                  RR\
        P                  ! 4       RR^R.	4      p\        V4      P                  P                  V RRR7      p\        R	\        P                  R
\        P                  \        P                  RR\        P                  \        P                  .	\        R7      p\        P                  ! W#4       R# )r   r   r   Tr   Nr4   rN   r   r2   r3   r   r   )rd   re   r   r   r!   r   r6   r   r   r   r%   r&   )r*   ri   r+   r,   s       r.   (test_replace_compiled_regex_mixed_objectr$  3  s    
**X
C
	x~~'74CPC C[__$$S"D$9F	bffc2662665$GvH 6,r0   c                 .   \        R P                  R4      .V R7      p\        RP                  R4      .V R7      p\        P                  ! R\        P                  R7      pVP
                  P                  VRRR7      p\        P                  ! WB4       R	# )
r   r   r   r   r   r^   r   Tr   N)	r   r   rd   re   r   r   r   r%   r&   )r(   ri   r,   r*   r+   s   &    r.   #test_replace_compiled_regex_unicoder&  ?  su    
"))'23;K
LC(//89AQRH
**&bjj
9CWW__S$d_3F6,r0   c           	         \        R \        P                  .V R7      p\        P                  ! R4      pRp\
        P                  ! \        VR7      ;_uu_ 4        VP                  P                  VR\        P                  RR7       RRR4       \
        P                  ! \        VR7      ;_uu_ 4        VP                  P                  VRR	RR
7       RRR4       \
        P                  ! \        VR7      ;_uu_ 4        VP                  P                  VRRRR
7       RRR4       R#   + '       g   i     L; i  + '       g   i     Lq; i  + '       g   i     R# ; i)fooBAD__barBAD__badr   r   z9case and flags cannot be set when pat is a compiled regexr?   rN   Tr   NFr   r   )r   r   r!   rd   re   rB   rC   rD   r   r   rg   r(   ri   r*   rF   s   &   r.   "test_replace_compiled_regex_raisesr+  G  s     '08H
IC
**X
C
EC	z	-	-Rr}}DA 
. 
z	-	-Re48 
. 
z	-	-Rd$7 
.	- 
.	- 
.	- 
.	-	-s$   .D*4 D=  E*D:	=E	E!	c                    \        R \        P                  .V R7      pR p\        P                  ! R4      pVP
                  P                  W2^RR7      p\        R\        P                  .V R7      p\        P                  ! WE4       R# )r   r   c                 @    V P                  ^ 4      P                  4       # r   r   r   s   &r.   r   6test_replace_compiled_regex_callable.<locals>.<lambda>\  r   r0   r   Tr   r   Nr!  )r(   ri   r   r*   r+   r,   s   &     r.   $test_replace_compiled_regex_callabler/  Y  si    
"BFF+3C
DC*D
**_
%CWW__S!4_8F'08HIH6,r0   zregex,expected_valc                     \        R R\        P                  .VR7      p\        RV\        P                  .VR7      pVP                  P	                  RRV R7      p\
        P                  ! WT4       R# )zf.or   r   baozf.rS   r   Nr   )r   expected_valr(   ri   r,   r+   s   &&&   r.   test_replace_literalr3  c  sZ     %'/?
@CulBFF3;KLHWW__T4u_5F6,r0   c                     \        . V R 7      pR pRp\        P                  ! \        VR7      ;_uu_ 4        VP                  P                  RVRR7       RRR4       R#   + '       g   i     R# ; i)r   c                 @    V P                  ^ 4      P                  4       # r   r   r   s   &r.   r   6test_replace_literal_callable_raises.<locals>.<lambda>n  r   r0   z2Cannot use a callable replacement when regex=Falser?   abcFr   Nr   )r(   ri   r   rF   s   &   r.   $test_replace_literal_callable_raisesr8  l  sO    
+
,C*D
>C	z	-	-t51 
.	-	-	-s   A  A1	c                    \        . V R 7      p\        P                  ! R4      pRp\        P                  ! \
        VR7      ;_uu_ 4        VP                  P                  VRRR7       RRR4       R#   + '       g   i     R# ; i)r   r   zCCannot use a compiled regex as replacement pattern with regex=Falser?   rN   Fr   N)r   rd   re   rB   rC   rD   r   r   r*  s   &   r.   $test_replace_literal_compiled_raisesr:  u  sX    
+
,C
**_
%C
OC	z	-	-Ru- 
.	-	-	-s   
A33B	c                 d   \        R RRRRR\        P                  RRR.
V R	7      pVP                  P	                  R R
4      p\        R
RRRRR\        P                  RRR.
V R	7      p\
        P                  ! W#4       VP                  P	                  R R
RR7      p\        R
RRRRR\        P                  RRR.
V R	7      p\
        P                  ! W#4       VP                  P	                  RRRRR7      p\        R RRRRR\        P                  RRR.
V R	7      p\
        P                  ! W#4       R# )rI   rJ   rK   rL   rM   rN   rO   rP   rQ   r   YYYYYYabaCYYYBYYYFr   
YYYYYYbYYYBYYYcYYYcYYYtz^.a|dogzXX-XX Tr)  zXX-XX bazXX-XX cazXX-XX BAzXX-XX tNr   r   s   &   r.   test_replace_moarrB  ~  s8   
	c3BFFFE5IC
 WW__S%(F	S(FB
E5QH 6,WW__S%e_4FFF	
 H 6,WW__YuD_IFFF	
 H 6,r0   c                    \        R RRR\        P                  .V R7      pVP                  P	                  RRRRR7      p\        R	R	R
R
\        P                  .V R7      p\
        P                  ! W#4       VP                  P	                  RR	RRR7      p\        R	R	RR\        P                  .V R7      p\
        P                  ! W#4       R# )zA.za.Abrs   r   r2   r;   Fr)  zc.cbNr   r   s   &   r.   )test_replace_not_case_sensitive_not_regexrF    s    
$dD"&&19I
JCWW__S#E_?FtT4rvv6>NOH6,WW__T4e5_AFtT4rvv6>NOH6,r0   c                     \        R RR\        P                  R.V R7      pVP                  P	                  RR RR7      p\        R R R\        P                  R.V R7      p\
        P                  ! W#4       R# )	r2   r3   acrN   r   z^.$Tr   Nr   )r(   rT   r+   r,   s   &   r.   test_replace_regexrI    s`    S$+3CDAUU]]5#T]2FsCrvvr2:JKH6,r0   c                 @   \        R RR\        P                  R.VR7      pVP                  P	                  RRV R7      pV '       d"   \        RRR\        P                  R.VR7      pM \        RRR\        P                  R.VR7      p\
        P                  ! W44       R	# )
za.b.r3   rN   r   r2   r   aaaaabNr   )r   r(   rT   r+   r,   s   &&   r.   #test_replace_regex_single_characterrN    s     	sC,4DEAUU]]35]1F5#sBFFB7?OP5#sBFFB7?OP6,r0   c                 >   \        . R
OV R7      pVP                  P                  VRRR7      pV R8X  d   RpM>V R8X  d   \        P                  pM&V R8X  d   \
        P                  pM\        R	V  24      h\        . VOVNV R7      p\        P                  ! WF4       R# )rv   Nr   r   Tr   r   r   r[   Unrecognized dtype: ru   )
r   r   r   r   r!   rz   r|   rD   r%   r&   r(   r*   r   ri   r+   null_resultr,   s   &&&    r.   test_replace_lookaroundsrS    s     /7G
HCWW__S#T_2F8#	U	"ff	X	%ee/0@/ABCC33{3;KLH6,r0   c                 $   \        . ROV R7      pVP                  P                  RRRR7      pV R8X  d"   V P                  R8X  d   \        . ROV R7      pM\        . ROV R7      p\        P
                  ! W#4       VP                  P                  RRRR7      p\        . ROV R7      p\        P
                  ! W#4       \        . ROV R7      pVP                  P                  R	RRR7      p\        . ROV R7      p\        P
                  ! W#4       R
# )r   r   r   r   Tr   r[   r\   r   r   Nr   )r   r   r   r   )r   r   r   zx
r   r`   r   r   )r   r`   r   r   )r   r   r   rf   r%   r&   r   s   &   r.   test_replace_end_of_stringrV    s    
08H
IC WW__VS_5F8#(8(@(@I(M7?OP 5=MN6, WW__Xs$_7F3;KLH6, 3;K
LCWW__Y4_8F3;KLH6,r0   c                    V R 8X  d
   \         pRpM%\        V 4      '       d   RMRp\        P                  p\	        R\        P                  R.V R7      pVP
                  P                  R4      p\	        RVR.VR7      p\        P                  ! WE4       \	        RR	\        P                  R.V R7      pVP
                  P                  R
4      p\	        RRVR.VR7      p\        P                  ! WE4       VP
                  P                  R4      p\	        RRVR.VR7      p\        P                  ! WE4       \	        RR\        P                  R.V R7      pVP
                  P                  R4      p\	        RRVR.VR7      p\        P                  ! WE4       VP
                  P                  R4      p\	        RRVR.VR7      p\        P                  ! WE4       R# )r   Fr   r   r   r   r   .*(BAD[_]+).*(BAD)TBAD_BADleroybrown.*BAD[_]+.*BADzBAD[_]+.*BADz^BAD_BADleroybrownz^BAD[_]+.*BADz\^BAD[_]+.*BADN)	r$   r	   r   r!   r   r   r@   r%   r&   )r(   r-   rU   r)   r+   r,   s   &     r.   
test_matchr[    s   5  66FGGHY 	 66%rvvu5=MNFZZ23FtXu-^DH6,	.>FVF ZZ./FtT8U3>JH6,ZZn-FudHe4NKH6,	/?GWF ZZo.FueXu5^LH6,ZZ/0FudHe4NKH6,r0   c                     \        R \        P                  RR\        P                  ! 4       RR^R.	4      p \        V 4      P
                  P                  R4      p\        R\        P                  R\        P                  \        P                  RR\        P                  \        P                  .	4      p\        V\         4      '       g   Q h\        P                  ! W4       R# )aBAD_BAD	BAD_b_BADTr   Nr4   rX  F)
r   r   r!   r   r6   r   r@   rx   r%   r&   r7   s      r.   test_match_mixed_objectr_  4  s    FFNN
	
E E]$$%9:FtRVVT2662665$PRPVPVWXHff%%%%6,r0   c                    \        R R\        P                  .V R7      pVP                  P	                  R RR7      p\        V 4      '       d   \        P                  MRp\        . R
OVR7      p\        P                  ! W$4       VP                  P	                  R 4      pV R8X  d
   \        pRpM%\        V 4      '       d   RMRp\        P                  p\        RRV.VR7      p\        P                  ! W$4       R	# )r2   r3   r   Fr   r   Tr   r   N)TFF)
r   r   r!   r   r@   r	   r'   r%   r&   r$   )r(   rT   r+   r-   r,   rU   s   &     r.   test_match_na_kwargra  H  s    S"&&!)9:AUU[[['F12BCC  *.AH6,UU[[F5  66FGGHY 	 66tUH-^DH6,r0   c                     \        . ROV R7      pVP                  P                  R RR7      p\        V 4      '       d   \        P
                  MRp\        . ROVR7      p\        P                  ! W$4       R# )rs   r   Fr   r   Nrs   ABr7  ABCTTTTr   r   r@   r	   r   r'   r%   r&   )r(   r)   r+   r-   r,   s   &    r.   test_match_case_kwargrh  b  s_    .6FGFZZd/F12BCC  .nEH6,r0   c                 b   \        V 4      '       d   \        P                  MR p\        . R
OV R7      pVP                  P                  \        P                  ! R4      4      p\        . ROVR7      p\        P                  ! W44       Rp\        P                  ! \        VR7      ;_uu_ 4        VP                  P                  \        P                  ! R4      RR7       RRR4       VP                  P                  \        P                  ! R\        P                  R7      4      p\        . ROVR7      p\        P                  ! W44       R	p\        P                  ! \        VR7      ;_uu_ 4        VP                  P                  \        P                  ! R4      \        P                  R7       RRR4       VP                  P                  \        P                  ! R\        P                  R7      \        P                  R7       R#   + '       g   i     EL4; i  + '       g   i     Lu; i)r   rs   r   Fz^Cannot both specify 'case' and pass a compiled regexp object with conflicting case-sensitivityr?   r   Nr^   zTCannot both specify 'flags' and pass a compiled regexp object with conflicting flagsrc  r   rf  )r	   r   r'   r   r   r@   rd   re   r%   r&   rB   rC   rD   rg   )r(   r-   r)   r+   r,   rF   s   &     r.   test_match_compiled_regexrj  l  sn    22BCC  .6FGFZZbjj./F0GH6,	:  
z	-	-

D)6 
. ZZbjjR]]CDF.nEH6,	/  
z	-	-

D)? 
. JJRZZBMM:"--P 
.	-	- 
.	-s   -2H
1A H
H	H.	zpat, case, exprD  bcz	a[a-z]{1}z	A[a-z]{1}z	(bc)|(ab)z((bc)|(ab))c                     \        R R.V R7      pVP                  P                  WR7      p\        V 4      '       d   \        P
                  MRp\        W6R7      p\        P                  ! WW4       R# )r7  Xabr   r   r   Nrg  )r(   r*   r   r   ri   r+   r-   r,   s   &&&&    r.   test_str_match_extra_casesrn    s^     %'7
8CWW]]3]*F 22BCC  c0H6,r0   c                 "   V R 8X  d   R RrCM2V R8X  d   RRrCM'V R8X  d   R\         P                  rCM\        RV  24      h\        . R	OV R7      pVP                  P                  V4      p\        . VOVNVR7      p\        P                  ! Wg4       R# )
r   Nr   r$   Fr[   r   rP  r   ru   )rz   r|   rD   r   r   r@   r%   r&   )r(   r*   r   r-   rR  ri   r+   r,   s   &&&     r.   test_match_lookaroundsrp    s     8#&.	U	"&,e	X	%&//0@/ABCC
/7G
HCWW]]3F33{3>JH6,r0   c                 X   \        V 4      '       d   \        P                  MR p\        . ROV R7      pVP                  P                  R4      pV R8X  d"   V P                  R8X  d   \        . R	OVR7      pM\        . R
OVR7      p\        P                  ! W44       VP                  P                  R4      p\        . R	OVR7      p\        P                  ! W44       \        . ROV R7      pVP                  P                  R4      p\        . ROVR7      p\        P                  ! W44       R# )r   r   r   r[   r\   r   r   Nr   r   r   rU  TFFF)	r	   r   r'   r   r   r@   rf   r%   r&   r   s   &    r.   test_match_end_of_stringrs    s     22BCC  08H
IC WW]]6"F8#(8(@(@I(M5^L 4NK6, WW]]8$F1HH6, 3;K
LCWW]]9%F1HH6,r0   c                 D   \        R R\        P                  R.V R7      pVP                  P	                  R4      pV R8X  d   \        . RO\
        R7      pM4\        V 4      '       d   RMR	p\        RR\        P                  R.VR7      p\        P                  ! W#4       R
# )r   rY  r   r   rZ  r   TFr   r   Nrr  	r   r   r!   r   	fullmatchr$   r	   r%   r&   r(   ri   r+   r,   r-   s   &    r.   test_fullmatchrx    s    
	.>FVC WW/0F5 5TB 66FGGHY 	 46nM6,r0   c                 D   \        R R\        P                  R.V R7      pVP                  P	                  R4      pV R8X  d   \        . RO\
        R7      pM4\        V 4      '       d   RMR	p\        RR\        P                  R.VR7      p\        P                  ! W#4       R
# )r   zfoo$foozfoo$r   zfoo\$r   FTr   r   N)FFFTru  rw  s   &    r.   test_fullmatch_dollar_literalrz    s    
%BFFF3;K
LCWWx(F5 5TB 66FGGHY 	 5%6nM6,r0   c                    \        R R\        P                  R.V R7      pVP                  P	                  RRR7      p\        V 4      '       d   \        P                  MRp\        . R	OVR7      p\        P                  ! W$4       R# )
r   rY  r   r   rZ  Fr   r   Nrr  )	r   r   r!   r   rv  r	   r'   r%   r&   )r(   ri   r+   r-   r,   s   &    r.   test_fullmatch_na_kwargr|    sr    
	.>FVC WW/E:F12BCC  1HH6,r0   c                    \        . ROV R7      p\        V 4      '       d   \        P                  MRp\        . R	OVR7      pVP                  P                  R RR7      p\        P                  ! WC4       \        . R
OVR7      pVP                  P                  R RR7      p\        P                  ! WC4       VP                  P                  R \        P                  R7      p\        P                  ! WC4       R# )rs   r   r   TFr   r^   Nrc  rr  TTFF)
r   r	   r   r'   r   rv  r%   r&   rd   rg   )r(   ri   r-   r,   r+   s   &    r.   test_fullmatch_case_kwargr    s    
+3C
DC12BCC  1HHWWt$/F6,0GHWWt%0F6,WWt2==9F6,r0   c                    \        V 4      '       d   \        P                  MR p\        . ROV R7      pVP                  P                  \        P                  ! R4      4      p\        . ROVR7      p\        P                  ! W44       V R8X  di   V P                  R8X  dX   VP                  P                  \        P                  ! R4      RR7      p\        . ROVR7      p\        P                  ! W44       M^\        P                  ! \        RR7      ;_uu_ 4        VP                  P                  \        P                  ! R4      RR7       R	R	R	4       VP                  P                  \        P                  ! R\        P                  R
7      4      p\        . ROVR7      p\        P                  ! W44       \        P                  ! \        RR7      ;_uu_ 4        VP                  P                  \        P                  ! R4      \        P                  R
7       R	R	R	4       R	#   + '       g   i     L; i  + '       g   i     R	# ; i)r   rs   r   Fr[   r\   r   r]   r?   Nr^   rc  rr  r~  )r	   r   r'   r   r   rv  rd   re   r%   r&   rf   rB   rC   rD   rg   )r(   r-   r)   r+   r,   s   &    r.   test_fullmatch_compiled_regexr  #  s    22BCC  .6FGFZZ!!"**T"23F1HH6, 8#(8(@(@I(M%%bjj&6U%C4NK
v0]]U
 
 JJ  D!1 >

 ZZ!!"**T"GHF0GH6,	Q
 
 	

RZZ-R]]C
 

 

 
 
s   2H&A H9&H6	9I
	zpat, case, na, expr7  Abcz	a[a-z]{2}abc$zabc\$zAbc$zAbc\$z(abc)|(abx)z((abc)|(abx))c                     \        . ROV R7      pVP                  P                  WVR7      pV R8X  d   RVR	&   \        pM\	        V 4      '       d   RMRp\        WGR7      p\
        P                  ! Wh4       R# )
r7  Nr   )r   r   r   Fr   r   )r7  r  z$abcN)r   r   rv  r$   r	   r%   r&   )	r(   r*   r   r   r   ri   r+   r-   r,   s	   &&&&&    r.   test_str_fullmatch_extra_casesr  D  sr    , .6F
GCWWs"5F5 B 66FGGHY 	 c0H6,r0   c                 6   V R 8X  d   R Rr2M2V R8X  d   RRr2M'V R8X  d   R\         P                  r2M\        RV  24      h\        . ROV R	7      pVP                  P                  V4      p\        RVR8X  d   R
MRRRV.VR	7      p\        P                  ! WV4       R# )r   Nr   r$   Fr[   r   rP  rs   r   Tru   )rz   r|   rD   r   r   rv  r%   r&   )r(   r*   r-   rR  ri   r+   r,   s   &&     r.   test_fullmatch_lookaroundsr  i  s     8#&.	U	"&,e	X	%&//0@/ABCC
/7G
HCWWs#F	tukJH 6,r0   c                    \        V 4      '       d   \        P                  MR p\        . ROV R7      pVP                  P                  R4      p\        . ROVR7      p\        P                  ! W44       VP                  P                  R4      p\        P                  ! W44       \        . ROV R7      pVP                  P                  R4      p\        . R	OVR7      p\        P                  ! W44       R# )
r   r   r   r   r   Nr   r   rU  rr  )r	   r   r'   r   r   rv  r%   r&   r   s   &    r.   test_fullmatch_end_of_stringr    s     22BCC  08H
IC WWv&F1HH6, WWx(F6, 3;K
LCWWy)F1HH6,r0   c                     \        R \        P                  RR.V R7      pVP                  P	                  R4      p\        RR.\        P                  . R..4      p\        W4      p\        P                  ! W#4       R# )r   r   r   r   r   BAD__N)r   r   r!   r   findallr   r%   r&   r   s   &   r.   test_findallr    se    
"BFFE59AQ
RCWW__Y'F'eW=>H /H6,r0   c                     \        R \        P                  RR\        P                  ! 4       RR^R.	4      p V P
                  P                  R4      p\        RR.\        P                  . \        P                  \        P                  R.R\        P                  \        P                  .	4      p\        P                  ! W4       R# )r   r   Tr   Nr4   r   r  )	r   r   r!   r   r6   r   r  r%   r&   r   s      r.   test_findall_mixed_objectr    s    
FFNN
	
C WW__Y'FeFFFFFFGFFFF
	
H 6,r0   c                 4   \        . ROV R7      pVP                  P                  V4      pV R8X  d   RpM>V R8X  d   \        P                  pM&V R8X  d   \
        P                  pM\        RV  24      h\        . VOVN4      p\        P                  ! WF4       R# )rv   Nr   r   r   r[   rP  ru   )
r   r   r  r   r!   rz   r|   rD   r%   r&   rQ  s   &&&    r.   test_findall_lookaroundsr    s     /7G
HCWW__S!F8#	U	"ff	X	%ee/0@/ABCC33{34H6,r0   c                    \        . ROV R7      pVP                  P                  R4      p\        . R.. R..\        R7      p\        P
                  ! W#4       VP                  P                  R4      p\        . R.. . .\        R7      p\        P
                  ! W#4       \        . ROV R7      pVP                  P                  R4      p\        R.. . . .\        R7      p\        P
                  ! W#4       R# )	r   r`   r   r   r   r   Nr   rU  )r   r   r  r   r%   r&   r   s   &   r.   test_findall_end_of_stringr    s    
08H
IC WW__V$FrE7B0?H6, WW__X&FrE7B+6:H6, 3;K
LCWW__Y'Fz2r2.f=H6,r0   c           
      
   \        . ROV R7      p\        V 4      '       d   \        P                  MRpVP                  P                  R4      p\        . ROVR7      p\        P                  ! W44       \        P                  ! \        P                  ! V4       Uu. uF  qUP                  R4      NK  	  up\        P                  R7      p\        P                  ! \        P                  ! V\        P                  R7      V4       VP                  P                  R4      p\        . ROVR7      p\        P                  ! W44       \        P                  ! \        P                  ! V4       Uu. uF  qUP                  R4      NK  	  up\        P                  R7      p\        P                  ! \        P                  ! V\        P                  R7      V4       VP                  P                  R^4      p\        . ROVR7      p\        P                  ! W44       \        P                  ! \        P                  ! V4       Uu. uF  qUP                  R^4      NK  	  up\        P                  R7      p\        P                  ! \        P                  ! V\        P                  R7      V4       VP                  P                  R^4      p\        . ROVR7      p\        P                  ! W44       \        P                  ! \        P                  ! V4       Uu. uF  qUP                  R^4      NK  	  up\        P                  R7      p\        P                  ! \        P                  ! V\        P                  R7      V4       VP                  P                  R^^4      p\        . R	OVR7      p\        P                  ! W44       \        P                  ! \        P                  ! V4       Uu. uF  qUP                  R^^4      NK  	  up\        P                  R7      p\        P                  ! \        P                  ! V\        P                  R7      V4       VP                  P                  R^^4      p\        . R	OVR7      p\        P                  ! W44       \        P                  ! \        P                  ! V4       Uu. uF  qUP                  R^^4      NK  	  up\        P                  R7      p\        P                  ! \        P                  ! V\        P                  R7      V4       R# u upi u upi u upi u upi u upi u upi )
ABCDEFGr   Int64EFN)r  BCDEFEF	DEFGHIJEFEFGHEFXXXX)   rA      r   r  )r        r  r  )r  rA   r  r  r  )r  rA   r  r  r  )r   r	   r   int64r   findr%   r&   r    assert_numpy_array_equalrfind)r(   ri   r-   r+   r,   vs   &     r.   	test_findr    sZ   
=EUC 22BCC  WW\\$F&n=H6,xxrxx}=}!}=RXXNHrxx @(KWW]]4 F&n=H6,xx>1>bhhOHrxx @(KWW\\$"F&n=H6,xx"((3-@-Qa-@QHrxx @(KWW]]4#F&n=H6,xx288C=A=aq)=ARHrxx @(KWW\\$1%F'~>H6,xxRXXc]C]a+]C288THrxx @(KWW]]4A&F'~>H6,xxbhhsmDmq!,mDBHHUHrxx @(K? > ? A B D Es$   T3.T8T=U-UUc                    \        . V R 7      p\        P                  ! \        RR7      ;_uu_ 4        VP                  P                  ^ 4       RRR4       \        P                  ! \        RR7      ;_uu_ 4        VP                  P                  ^ 4       RRR4       R#   + '       g   i     LZ; i  + '       g   i     R# ; i)r   z!expected a string object, not intr?   N)r   rB   rC   r   r   r  r  )r(   ri   s   & r.   test_find_bad_arg_raisesr  (  sz    
+
,C	y(K	L	LQ 
M 
y(K	L	La 
M	L 
M	L 
M	L	Ls   B :B3 B0	3C	c                    \        R \        P                  R\        P                  R.V R7      p\        V 4      '       d"   \        P                  p\        P                  pMRp\
        P                  pVP                  P                  R4      p\        ^V^VR.VR7      p\        P                  ! WE4       VP                  P                  R4      p\        ^V^VR.VR7      p\        P                  ! WE4       VP                  P                  R^4      p\        ^V^VR.VR7      p\        P                  ! WE4       VP                  P                  R^4      p\        ^V^VR.VR7      p\        P                  ! WE4       VP                  P                  R^^4      p\        ^VRVR.VR7      p\        P                  ! WE4       VP                  P                  R^^4      p\        ^VRVR.VR7      p\        P                  ! WE4       R# )r  r  r  r   r  r  Nr  )r   r   r!   r	   float64rz   r|   r   r  r%   r&   r  )r(   ri   r-   itemr+   r,   s   &     r.   test_find_nanr  1  s   
	BFFK8@PC %%566vv uuWW\\$Fq$4,NCH6,WW]]4 Fq$4,NCH6,WW\\$"Fq$4,NCH6,WW]]4#Fq$4,NCH6,WW\\$1%Fq$D"-^DH6,WW]]4A&Fq$D"-^DH6,r0   infer_string)marksc                     V ! . ROVR7      p\         P                  RR4      pVP                   P                  V4      pV ! . ROVR7      p\        P                  ! WV4       R# )abcdefgr   r7  cdeN)r  abcccdddfgcdefggg)cdedefgcdeeedddfgedefggg)r   	maketrans	translater%   assert_equal)r   r(   r  r   tabler+   r,   s   &&&    r.   test_translater  Z  sX     08HC MM%'EWWu%F08HH OOF%r0   c                      \        . RO4      p \        P                  RR4      p\        RRR\        P                  .\
        R7      pV P                  P                  V4      p\        P                  ! W24       R# )	r2   r;   r7  r  der   N)r2   r3   r;   g333333?)	r   r   r  r   r!   r   r  r%   r&   )rT   r  r,   r+   s       r.   test_translate_mixed_objectr  i  sV    #$AMM%'EsCbff-V<HUU__U#F6,r0   c                 H   R RRRRRR\         P                  /p\        WR7      pRpVP                  P	                  V\
        P                  R	R
7      pVP                  ^ ,          P                  4       . RO8X  g   Q hVP                  P                  V\
        P                  R7      pVP                  ^ ,          '       g   Q hVP                  P                  V\
        P                  R7      pVP                  ^ ,          '       g   Q hVP                  P                  V\
        P                  R7      pVP                  ^ ,          ^ ,          R8X  g   Q hVP                  P                  V\
        P                  R7      pVP                  ^ ,          ^8X  g   Q hRp\        P                  ! \        VR7      ;_uu_ 4        VP                  P!                  V\
        P                  R7      pRRR4       VP                  ^ ,          '       g   Q hR#   + '       g   i     L-; i)Davezdave@google.comStevezsteve@gmail.comRobzrob@gmail.comWesr   z,([A-Z0-9._%+-]+)@([A-Z0-9.-]+)\.([A-Z]{2,4})T)r_   expandr^   zhas match groupsr?   N)davegooglecom)r   r!   r   r   extractrd   rg   iloctolistr@   rv  r  countr%   assert_produces_warningUserWarningr#   )r(   r   r*   r+   rF   s   &    r.   test_flags_kwargr  u  s   !"rvv	D $/D
9CXXctDF;;q>  "&????XX^^Cr}}^5F;;q>>>XX2==9F;;q>>>XXc7F;;q>! 9999XX^^Cr}}^5F;;q>Q
C		#	#Ks	;	;""3bmm"< 
<;;q>>> 
<	;s    ,HH!	)TT)FF)r   F)rA   Tr   r   r~  )r   r   )NTF)r2   r3   N)r2   r3   r;   adr   )named_groups_full_swapnumbered_groups_no_g_full_swapnumbered_groups_full_swapsingle_group_with_literal"mixed_group_reference_with_literal)z\g<20>r  z\40z\4)z(\w+) (\w+) (\w+)r  )r   r  )z
var.one(0)z
var.two(1)zvar.three(2))Tr1  )Fr   )rv   xbrS   rw   )rv   axrS   rw   )xxrs   bxrw   )r  r  rS   rw   )rv   r   rS   rw   )FFFFrr  )TFFN)FFFN)FTFN)ro   rp   rq   rr   rs   )`r   rd   numpyr   rB   pandas._libsr   pandas.util._test_decoratorsutil_test_decoratorstdpandasrz   r   r   r   r%   pandas.tests.stringsr   r	   r/   r9   r=   r  parametrizer|   r!   rG   rV   rY   rj   rn   ry   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r  r  r  
skip_if_nor  r  r"  r$  r&  r+  r/  r3  r8  r:  rB  rF  rI  rN  rS  rV  r[  r_  ra  rh  rj  rn  rp  rs  rx  rz  r|  r  r  r  r  r  r  r  r  r  r  r  r  paramr  r  r  r   r0   r.   <module>r     s    	    ) )  
[-|-"-0 	ruu	
 4-01 1
1"1-h->!3H-0 	/0	01	./	/0	*+	 eRVVT255QR- S	->'-^
*  788Z"89bffbee'<=e}-# . > : 9#@ 23( 4(D  788Z"89bffbee'<=e}-# . > : 9#@ 23( 4(>?1-	--- $C:!67"24I!JK# L 8#- 
\,.GH
2
2  )m,	

 m,	

 !m,	

 V	

 $	
#,	1  @ u6
- 7AB
- 
 u63 73> &=-- "  8	
 8	
 y-  ---	--8$- -~/NO- P-2.0-f
-- 4-0
- 1
- 	,-	-.	,-	-.	&'	-	- ->$-N-(-4-QD 	utUm$	teU^$	teU^$	edE]+	dUEN+	dT5M*	tUm,	-- 	/0	12	/0	/0	*+	-	- -F-"-	--(DB  
t78	d78	tT67	ud78	eT#=>	dD"=>	89	5$ :;	t89	4:;	d$>?	$&@A	*-+*-  	B-	-(-:--B 	R#B'(	b3%R()	c3ZcUB/0	sCj3%R01	TFB#$	-	- -4*LZ!-R UFLLR]]95MNO	&	&-r0   