--- a/filemanager/src/inc/fmdefine.h Fri Jun 25 17:08:34 2010 +0800
+++ b/filemanager/src/inc/fmdefine.h Fri Jul 09 11:17:55 2010 +0800
@@ -71,4 +71,20 @@
#define FmMaxLengthofDriveName 11
#define FmMaxLengthofDrivePassword 8
+
+// used to match un-empty string, and is not totally empty characters.
+#define Regex_ValidUnEmpty QString( "^.*[^\\s].*$" )
+
+// this is regexp for vaild file/folder name: no \/:*?"<>| and is not totally empty characters.
+// file name can not end with "." , but it is not include in this RegExp. It should be checked in Regex_ValidNotEndWithDot
+// this expression is composed by two expressions:
+// ^.*[^\\s].*$ used to match un-empty string and is not totally empty characters.
+// [^\\\\/:*?\"<>|] used to math valid file/folder name
+// merge the two regex together:
+// vaild file/folder name and is not totally empty.
+#define Regex_ValidFileFolderName QString( "^[^\\\\/:*?\"<>|]*[^\\\\/:*?\"<>|\\s][^\\\\/:*?\"<>|]*$" )
+
+// is not end with dot( trim blank characters in the end first )
+#define Regex_ValidNotEndWithDot QString( "^.*[^\\.\\s][\\s]*$" )
+
#endif