fork(41) download
  1. class Ideone
  2. {
  3. public static void main (String[] args) throws java.lang.Exception
  4. {
  5. String line ="${env1}sojods${env2}${env3}";
  6.  
  7. System.out.println( line.replaceAll("\\$\\{env([0-9]+)\\}", "$1") );
  8. }
  9. }
Success #stdin #stdout 0.1s 321536KB
stdin
Standard input is empty
stdout
1sojods23