Derrick Stolee <stolee@xxxxxxxxx> writes: >>> test_expect_success '--replace-all and value_regex' ' >>> q_to_tab >.git/config <<-\EOF && >>> [abc] >>> Qkey = one >>> Qkey = two >>> Qkey = three >>> EOF >>> q_to_tab >expect <<-\EOF && >>> [abc] >>> Qkey = four >>> Qkey = two >>> Qkey = three >>> EOF >>> git config --replace-all abc.key four "o*" && >>> test_cmp expect .git/config >>> ' >> ... > Thank you. Naturally, PEBKAC and my lack of understanding the > regex I was using in my own test. Clearly this is behaving > correctly. Modifying as suggested shows this works properly. It is an easy confusion. When I see a pattern, especially a single letter followed by an asterisk like "o*", my eyes take it as a glob pattern that is left anchored, i.e. "any string that begins with an 'o'", and if that were the matching rule, what you expected is totally the natural outcome. But here we unfortunately are looking at ERE.