• : Function ereg() is deprecated in /home/tcdaemon/tygerclan-Prod/site/includes/file.inc on line 649.
  • : Function ereg() is deprecated in /home/tcdaemon/tygerclan-Prod/site/includes/file.inc on line 649.
  • : Function ereg() is deprecated in /home/tcdaemon/tygerclan-Prod/site/includes/file.inc on line 649.
  • : Function ereg() is deprecated in /home/tcdaemon/tygerclan-Prod/site/includes/file.inc on line 649.
  • : Function ereg() is deprecated in /home/tcdaemon/tygerclan-Prod/site/includes/file.inc on line 649.
  • : Function ereg() is deprecated in /home/tcdaemon/tygerclan-Prod/site/includes/file.inc on line 649.
  • : Function ereg() is deprecated in /home/tcdaemon/tygerclan-Prod/site/includes/file.inc on line 649.
  • : Function ereg() is deprecated in /home/tcdaemon/tygerclan-Prod/site/includes/file.inc on line 649.
  • : Function ereg() is deprecated in /home/tcdaemon/tygerclan-Prod/site/includes/file.inc on line 649.
  • : Function ereg() is deprecated in /home/tcdaemon/tygerclan-Prod/site/includes/file.inc on line 649.
  • : Function ereg() is deprecated in /home/tcdaemon/tygerclan-Prod/site/includes/file.inc on line 649.
  • : Function ereg() is deprecated in /home/tcdaemon/tygerclan-Prod/site/includes/file.inc on line 649.
  • : Function ereg() is deprecated in /home/tcdaemon/tygerclan-Prod/site/includes/file.inc on line 649.
  • : Function ereg() is deprecated in /home/tcdaemon/tygerclan-Prod/site/includes/file.inc on line 649.
  • : Function ereg() is deprecated in /home/tcdaemon/tygerclan-Prod/site/includes/file.inc on line 649.
  • : Function ereg() is deprecated in /home/tcdaemon/tygerclan-Prod/site/includes/file.inc on line 649.
  • : Function ereg() is deprecated in /home/tcdaemon/tygerclan-Prod/site/includes/file.inc on line 649.
  • : Function ereg() is deprecated in /home/tcdaemon/tygerclan-Prod/site/includes/file.inc on line 649.
  • : Function ereg() is deprecated in /home/tcdaemon/tygerclan-Prod/site/includes/file.inc on line 649.
  • : Function ereg() is deprecated in /home/tcdaemon/tygerclan-Prod/site/includes/file.inc on line 649.
  • : Function ereg() is deprecated in /home/tcdaemon/tygerclan-Prod/site/includes/file.inc on line 649.
  • : Function ereg() is deprecated in /home/tcdaemon/tygerclan-Prod/site/includes/file.inc on line 649.
  • : Function ereg() is deprecated in /home/tcdaemon/tygerclan-Prod/site/includes/file.inc on line 649.
  • : Function ereg() is deprecated in /home/tcdaemon/tygerclan-Prod/site/includes/file.inc on line 649.
  • : Function ereg() is deprecated in /home/tcdaemon/tygerclan-Prod/site/includes/file.inc on line 649.
  • : Function ereg() is deprecated in /home/tcdaemon/tygerclan-Prod/site/includes/file.inc on line 649.
  • warning: Creating default object from empty value in /home/tcdaemon/tygerclan-Prod/site/modules/taxonomy/taxonomy.module on line 1390.

grep

POSIX RegEx for hostnames

Here is a POSIX compliant regular expression for testing a hostname.  This does not support a fully quilified domain name (FQDN).  This was tested with linux grep. 

'^([[:digit:]a-zA-Z]([-[:digit:]a-zA-Z]{0,61}[[:digit:]a-zA-Z]){0,1})$'

Here is a working example:

grep -E -i -w '^([[:digit:]a-zA-Z]([-[:digit:]a-zA-Z]{0,61}[[:digit:]a-zA-Z]){0,1})$'

 

Syndicate content