```
/// <summary>
/// Given HTML overlay for an image in the store, render it.
/// [p:n] renders as price for item ID n
/// </summary>
/// <returns>Rendered result</returns>
public static string RenderHTMLOverlay(string overlayHTML, int currencyID)
{
    const string pattern = "\\[p\\:(\\b\\d+\\b)\\]";
    overlayHTML = Regex.Replace(overlayHTML, pattern, FormatCurrency(GetItemPriceOnDate(DateTime.Now, currencyID, int.Parse("$1"))));

    return overlayHTML;
}

```

This doesn't work because `$1` can't be passed as a parameter correctly to `int.Parse`.

```
Exception Details: System.FormatException: Input string was not in a correct format.

```

Does anyone know how I can work around this limitation?