```sql
SELECT replaceRegexpAll('a', 'z*', '')
```

```
┌─replaceRegexpAll('a', 'z*', '')─┐
│                                 │
└─────────────────────────────────┘
```

```sql
SELECT replaceRegexpAll('aaaa', 'z*', '')
```

```
┌─replaceRegexpAll('aaaa', 'z*', '')─┐
│ aaa                                │
└────────────────────────────────────┘
```

Please create another issue.

_Originally posted by @alexey-milovidov in https://github.com/ClickHouse/ClickHouse/issues/35046#issuecomment-1061220789_
Instruction(std::string literal_) : literal(std::move(literal_)) {}
    };
    using Instructions = std::vector<Instruction>;
    static const size_t max_captures = 10;
    static Instructions createInstructions(const std::string & s, int num_captures)
    {
        Instructions instructions;
        String now;
        for (size_t i = 0; i < s.size(); ++i)
        {
            if (s[i] == '\\' && i + 1 < s.size())
            {
                if (isNumericASCII(s[i + 1])) 
                {
                    if (!now.empty())