-- -*- M2-comint -*- hash: 14336843995059801752

i1 : replace("[a-z]+", "x", "Dog cat cat.")

o1 = Dx x x.

i2 : replace("(\\w+)\\.?", "A \\1.", "Dog cat cat.")

o2 = A Dog. A cat. A cat.

i3 : replace("(\\w+)\\.?", "A \\L$1.", "Dog cat cat.")

o3 = A dog. A cat. A cat.

i4 : s = "catfish cats dogs";

i5 : replace("cat(?!fish)s?", "\\U$&", s)

o5 = catfish CATS dogs

i6 : replace("\\w+(?=s\\b)", "\\U$&", s)

o6 = catfish CATs DOGs

i7 : s = "goldfish swordfish catfish catdog";

i8 : replace("\\w+(?=fish)", "\\U$&", s)

o8 = GOLDfish SWORDfish CATfish catdog

i9 : replace("(?<=cat)\\w+", "\\U$&", s)

o9 = goldfish swordfish catFISH catDOG

i10 : 
