294 バイト追加
、 2020年2月15日 (土) 07:33
==Java ContentDisposition からファイル名を抜き出す==
[Java]{{category 正規表現}}
Pattern ptn = Pattern.compile(".*filename\\s*=\\s*[\"]{0,1}([^\"]+)[\"]{0,1}.*")
Matcher matcher = ptn.matcher(contentDisposition);
if (matcher.matches()) {
filename = matcher.group(1);
}