Changeset 3385
- Timestamp:
- 08/29/2008 08:57:12 AM (3 months ago)
- Files:
-
- 1 modified
-
trunk/system/classes/valid.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/system/classes/valid.php
r3366 r3385 266 266 * dashes, periods, and underscores are allowed. 267 267 * 268 * @param string $str268 * @param string text to check 269 269 * @return boolean 270 270 */ 271 271 public static function standard_text($str) 272 272 { 273 return (bool) preg_match('/^[-\pL\pN\pZ_.]++$/uD', (string) $str); 273 // pL matches letters 274 // pN matches numbers 275 // pZ matches whitespace 276 // pPc matches underscores 277 // pPd matches dashes 278 // pPo matches normal puncuation 279 return (bool) preg_match('/^[\pL\pN\pZ\p{Pc}\p{Pd}\p{Po}]++$/uD', (string) $str); 274 280 } 275 281
