In the Vectorized String Methods documentation (http://pandas.pydata.org/pandas-docs/stable/basics.html#vectorized-string-methods)...
In [204]: s3 = Series(['A', 'B', 'C', 'Aaba', 'Baca',
.....: '', np.nan, 'CABA', 'dog', 'cat'])
.....:
In [205]: s3
Out[205]:
0 A
1 B
2 C
3 Aaba
4 Baca
5
6 NaN
7 CABA
8 dog
9 cat
dtype: object
In [206]: s3.str.replace('^.a|dog', 'XX-XX ', case=False)
Out[206]:
0 A
1 B
2 C
3 XX-XX ba
4 XX-XX ca
5
6 NaN
7 XX-XX BA
8 XX-XX
9 XX-XX t
dtype: object
Why, in the .replace() example above, is the 'ba' and 'BA' not selected by the regular expression fed as the first argument in the replace() method and replaced by 'XX-XX'? It seems to me to be saying ^ any character followed by . an a, or dog, replace, starting with that any character, with 'XX-XX ', regardless of case.