Question: I have a `Datagrid` where a add items using `grid.Items.Insert(0, row);`
I always want the last row I insert to be displayed first on Grid.
I also want the 1st row to have different color from others. For this purpose I am using `LoadingRow` event :

```
private void dataGrid_LoadingRow(object sender, DataGridRowEventArgs e)
{
 dataGrid.RowBackground = new SolidColorBrush(Colors.AntiqueWhite);//set all rows to default color
 e.Row.Background = new SolidColorBrush(Colors.CornflowerBlue); //set current=>1st row row to BLue                                
}

```

However every row added is getting colored `CornflowerBlue` without previous added rows changed to `AntiqueWhite`.
I am missing something obvious, would really appreciate any guidance.

Answer: 
You can replace string using regex, 

```
output = re.sub(r'(?is)(href="../)([^.])','http://www.phonebook.com.pk/'+r'\2',str(html))

```
Try using the following:

```
linkList1 = re.findall(re.compile(u'(?<=href=")../\w.*?(?=")'), str(html))

```

That guarantees that there has to be a word character after the slash.