---
title: "正则表达式"
author: "rafale35"
date: "2011-08-31T00:06:47Z"
tags: []
categories: ["移动开发"]
slug: "untitled"
draft: false
lastmod: "2011-08-31T00:06:47Z"
id: 1161965
url: "https://rafale35.iteye.com/blog/1161965"
---

```
	public static boolean isValidFileName2(String fileName) {
		if (fileName == null || fileName.length() > 255)
			return false;
		else
			return fileName.matches("[^\\s\\\\/:\\*\\?\\\"<>\\|]*");
	}
```