package com.platform.test;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

import org.junit.Test;

public class TestPattern {
	
	@Test
	public void test1Pattern() {
		String s = "e/FTP_GFS_point/320404_49/321311_215/320100_4/1/";
		
		// 末尾 含有 /
		Pattern pattern2 = Pattern.compile("\\d+\\/$");
		Matcher matcher2 = pattern2.matcher(s);
		//去掉 最后 的     数字 +/ 符合
		if (matcher2.find()) {
			String removeStr = matcher2.group();
			s = s.replace(removeStr, "");
		}
		System.out.println(s);
		
	}

}
