filemanager/src/inc/fmdefine.h
changeset 35 060d0b1ab845
parent 30 6e96d2143d46
child 41 fc4654ce4fcb
--- a/filemanager/src/inc/fmdefine.h	Tue Jul 06 14:06:28 2010 +0300
+++ b/filemanager/src/inc/fmdefine.h	Wed Aug 18 09:39:39 2010 +0300
@@ -71,4 +71,22 @@
 #define FmMaxLengthofDriveName           11
 #define FmMaxLengthofDrivePassword       8
 
+// used to match un-zeroLength string, empty character such as space is acceptable
+#define Regex_ValidUnZeroLength QString( "^.+$" )
+
+// 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