fixed regular expressions with $ or ^