fork download
  1. class test{
  2. public static void main(String[] args) {
  3. String str="lookup('PRODUCT','LKP1','LKP_TAB1.ID')||('A'='B')-lookup('PRODUCT','LKP1','LKP_TAB1.ID')||'CON.ID'";
  4. System.out.println(str);
  5. str = str.replaceAll("(lookup\\([^)]*)\\)","$1,123)");
  6. System.out.println(str);
  7.  
  8. }
  9. }
  10.  
Success #stdin #stdout 0.09s 212736KB
stdin
Standard input is empty
stdout
lookup('PRODUCT','LKP1','LKP_TAB1.ID')||('A'='B')-lookup('PRODUCT','LKP1','LKP_TAB1.ID')||'CON.ID'
lookup('PRODUCT','LKP1','LKP_TAB1.ID',123)||('A'='B')-lookup('PRODUCT','LKP1','LKP_TAB1.ID',123)||'CON.ID'