Changeset 1545
- Timestamp:
- 12/16/2007 02:39:45 AM (13 months ago)
- Files:
-
- 1 modified
-
trunk/system/libraries/Validation.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/system/libraries/Validation.php
r1536 r1545 1175 1175 $regex = current($regex); 1176 1176 1177 // Find a usable delimiter 1178 foreach (str_split('~#|!:;,./=-+*?\'"$', 1) as $delim) 1179 { 1180 if (strpos($regex, $delim) === FALSE) 1181 { 1182 if (preg_match($delim.$regex.$delim, $str)) 1183 { 1184 // Regex matches, return 1185 return TRUE; 1186 } 1187 break; 1188 } 1177 if (preg_match($regex, $str)) 1178 { 1179 // Regex matches, return 1180 return TRUE; 1189 1181 } 1190 1182 }
