Return to Snippet

Revision: 45622
at May 5, 2011 04:50 by pictonio


Initial Code
/**
   * A function used to validate non-english characters in a string using regex
   */
  function validate_non_english_characters($string) {
    $string = strtolower($string);

    if (!preg_match('/^[a-z0-9]{3,15}$/', $string)) {
      // do something          
    }
  }

Initial URL

                                

Initial Description

                                

Initial Title
validate non-english characters in a string

Initial Tags
php

Initial Language
PHP