上传文件格式化文件名称代码修改增加正则表达式判断问题修改
This commit is contained in:
parent
7e4353675e
commit
05c345425d
|
@ -66,9 +66,9 @@ public class SpectrumFileServiceImpl implements ISpectrumFileService {
|
|||
String tempFilePath = System.getProperty("java.io.tmpdir") + username + slash;
|
||||
List<String> fileNames = new ArrayList<>();
|
||||
List<File> fileList = new ArrayList<>();
|
||||
String sampleRx = "[a-zA-Z]{3}[0-9]{2}_[0-9]{3}-[0-9]{8}_[0-9]{4}_S_(FULL_|PREL_)\\d+\\.PHD";
|
||||
String sampleRx = "[a-zA-Z]{3}[0-9]{2}_[0-9]{3}-[0-9]{8}_[0-9]{4}_(S|G|D|Q)_(FULL_|PREL_)\\d+\\.PHD";
|
||||
Pattern regexPattern = Pattern.compile(sampleRx);
|
||||
String sampleRx1 = "[a-zA-Z]{3}[0-9]{2}_[0-9]{3}-[0-9]{8}_[0-9]{4}_S_(FULL_|PREL_)\\d+\\.\\d+\\.PHD";
|
||||
String sampleRx1 = "[a-zA-Z]{3}[0-9]{2}_[0-9]{3}-[0-9]{8}_[0-9]{4}_(S|G|D|Q)_(FULL_|PREL_)\\d+\\.\\d+\\.PHD";
|
||||
Pattern regexPattern1 = Pattern.compile(sampleRx1);
|
||||
try{
|
||||
File tempDir = new File(tempFilePath);
|
||||
|
|
Loading…
Reference in New Issue
Block a user