import java.text.SimpleDateFormat;
import java.util.Date;

import org.apache.commons.lang.StringUtils;


public class Test {
	public static void main(String[] args) {
		int startConv = StringUtils.indexOf(getPath(), "@[");		
		if(startConv != -1) {
			int endConv = StringUtils.indexOf(getPath(), "]");
			
			String beforeConvData = StringUtils.substring(getPath(), startConv+ 2, endConv);
			
			System.out.println("[convData]" + beforeConvData);
			
			SimpleDateFormat dateFormat = new SimpleDateFormat(beforeConvData);
			String convData = dateFormat.format(new Date());
			
			System.out.println(StringUtils.substring(getPath(), 0, startConv));
			System.out.println(convData);
			System.out.println(StringUtils.substring(getPath(), endConv+1 , getPath().length())); 
		}
		
	}
	
	public static String getPath() {
		return "DBSQL-@[yyyy-MM-dd-HH].txt";
	}
}
