**Describe the unexpected behaviour**

I expect

```sql
select replaceRegexpAll('Hello, World!', '^', 'here: ')
```

to produce 

```
here: Hello, World!
```

in v20, this is the case, and in v21 the result is:

```
here: ello, World!
```

**How to reproduce**

Run the above query in clickhouse v20, then in v21
memcpy(&res_data[res_offset], matches[it.first].data(), matches[it.first].length());
                        res_offset += matches[it.first].length();
                    }
                    else
                    {
                        res_data.resize(res_data.size() + it.second.size());
                        memcpy(&res_data[res_offset], it.second.data(), it.second.size());
                        res_offset += it.second.size();
                    }
                }
                if (replace_one || (!is_first_match && match.length() == 0))
                    can_finish_current_string = true;
                is_first_match = false;
            }
            else
                can_finish_current_string = true;
            
            if (can_finish_current_string)
            {
                res_data.resize(res_data.size() + input.length() - start_pos);
                memcpySmallAllowReadWriteOverflow15(&res_data[res_offset], input.data() + start_pos, input.length() - start_pos);
                res_offset += input.length() - start_pos;
                start_pos = input.length();
            }
        }
        res_data.resize(res_data.size() + 1);
        res_data[res_offset] = 0;
        ++res_offset;
    }
    static void vector(