Question: I would like to replace the first occurrence of multiple values in a string. Pls consider the following example :

**Input string :** `a,a,a,b,b,c`

**Values to be replaced :** `a,b`

**Expected Output :** `,a,a,,b,c`

Using the `|` operator doesn't work, as shown below :

```
select regexp_replace('a,a,a,b,b,c','a|b',null,1,1) from dual;

```

Output : `,a,a,b,b,c` . This replaces only the first occurrence of `a`.

As an extension to this, if `a` is to be replaced more than once, then the second occurrence should also be replaced in the input : 

**Input string** : `a,a,a,b,b,c`

**Values to be replaced :** `a,b,a`

**Expected Output :** `,,a,,b,c`

Is this achievable using `REGEXP_REPLACE` or through something else? If yes, how? Thanks in advance for your help!

Answer: 
I was able to fix this by myself. I was changing the original `seconds` value which was causing the issue to calculate the `minutes. So, I used a different variable to store the loop count and calculate minute:

```
new Vue({
    el: '#app',
    data: {
        hours: 0,
        minutes: 0,
        seconds: 0,
        counter : 0
    },
    methods: {
        timer() {
            setInterval(() => {
                this.seconds = ++this.counter % 60
                this.minutes = parseInt(this.counter / 60, 10) % 60
            }, 1000);
        }
    }
})

```
You could maybe replace `this.seconds` with this shorthand expression? 

```
this.seconds === 0 ? 60 : this.seconds

```