Question: I am trying to figure out how to add the `exact` property to the root link in a dynamically loaded menu. The menu entries are loaded from a REST API. 

Currently the root path is always matched since it does not contain the `exact` property. In similar examples the root link is hard coded which I want to avoid. 

This is the route that should be matched exactly

```
{ path: '/', component: HomePage }

```

The router-link is part of the menu, which is loaded via axios from the REST API and mapped to the state, including the root link "/". How can I access only this one item in the for loop to add the `exact` property? 

```
  <router-link tag="li" class="link" v-for="item in menu" v-bind:key="item.id" :to="item.slug">{{ item.content }}</router-link>

```

May be I am missing something, or there is a better way to achieve this?
Many thanks

Answer: 
I'm not quite sure how to differentiate -32- from -003-, I'm guessing you should replace a pattern that matches `-(number here)-`.

In `MySQL 8.0` you can use [`REGEXP_REPLACE()`](https://dev.mysql.com/doc/refman/8.0/en/regexp.html#function_regexp-replace) function.

```
SELECT REGEXP_REPLACE(text,'-[0-9]+-','',1,0,'c') FROM your_table;

```

the output will be:

```
011004
011003-B

```
This might not be quite right, but close enough...

```
SET @s = '011-12-004 , 011-32-003-B';
SELECT CONCAT(MID(@s,1,CHAR_LENGTH(SUBSTRING_INDEX(@s,'-',1))),MID(@s,CHAR_LENGTH(SUBSTRING_INDEX(@s,'-',2))+2,1000))x;

+-----------------------+
| x                     |
+-----------------------+
| 011004 , 011-32-003-B |
+-----------------------+

```