Some programming languages have its own Regex peculiarities, for example, the $+ term (in C#, Perl, VB etc.) which replaces the matched text to the last group captured.
Example:
using System;
using System.Text.RegularExpressions;
public class Example
{
public static void Main()
{
...