// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
public class RegRepl {
    public static void main(String[] args) {
        String s = "(252, 100, NULL ....";
        System.out.println(s);
        String s2 =   s.replaceAll("^(\\(\\d{1,4})(, )(\\d{1,3})", "$1\\$$3");
        System.out.println(s2);
    }
}
