//The regular expression starts and ends with a forward slash;
//. matches any singular character.
//  ? matches one or none of the preceding character.
//  + matches at least one of the preceding character.
//  * matches none or all of the preceding character.
//  ^ matches the absolute beginning of the string.
//  $ matches the absolute end of the string.
// \w+ matches a whole word.
//  \w matches a "word" character (alphanumerics and the "_" character).
//  \W+ matches whitespace.
//  x|y matches one or the other of x or y.
// [0..9] matches ONE number, ranging from 0 to 9.
//[A-Za-z] matches any letter, uppercase or lowercase.


//e-mail
email_pattern = /^(\w|\.|\-)+@(\w|\.|\-)+\.(((com|net|org|edu|gov|mil|[a-z]{2}) *$)|(((com|net|org|edu|gov|mil)\.[a-z]{2}) *$))/i;

// alphabetic string  aAbB, * at end makes it accept trailing blanks
alpha_pattern = /^[a-zA-Z]+ *$/; 

// alphanumeric string a1b2, * at end makes it accept trailing blanks
alphnum_pattern =  /^[a-zA-Z0-9]+ *$/;

// alphanumeric string anything numeric, alphabetic and _ 
valid_xmltag = /^([a-zA-Z0-9]|\_)+ *$/;

// alphanumeric string a1b2, MUST BE VALID PASSWORD
valid_password = /^(\w){8}/;

// alphanumeric string a1b2, MUST BE VALID PASSWORD
valid_shortpassword = /^(\w){4}/;

// alphanumeric string a1b2, MUST HAVE A LENGTH OF 4
alphnum_four_long = /^(\w){4}/;

// alphanumeric with symbols string a1b2 or . or -
alphnumsymb_four_long = /^(\w|\.|\-){4,15} *$/;

// valid_state NOT USING RIGHT NOW
//valid_state= /^(AL|AK|AZ|AR|CA|CO|CT|DE|DC|FL|GA|HI|ID|IL|IN|IA|KS|KY|LA|ME|MD|MA|MI|MN|MS|MO|MT|NE|NV|NH|NJ|NM|NY|NC|ND|OH|OK|OR|PA|RI|SC|SD|TN|TX|UT|VT|VA|WA|WV|WI|WY)/i;

//integer    0 or 123 
num_pattern = /^\d+$/;

// matches anything that is not 0-9
non_numeric = /^\D+$/;

// phone number

// did not work phone_pattern = /^ *\\(? *([0-9][0-9][0-9]) *\\)? *([0-9][0-9][0-9]) *-? *([0-9][0-9][0-9][0-9]) *$/;
// this is how phone can be displaied on a page	 = "(" + RegExp.$1 + ") " + RegExp.$2 + "-" + RegExp.$3;

//ssn

ssn_pattern = /^ *([0-9][0-9][0-9]) *-? *([0-9][0-9]) *-? *([0-9][0-9][0-9][0-9]) *$/;

// url 
//^(([^:]+)://)?([^:/]+)(:([0-9]+))?(/.*)
//(^.+)(\?|\#)(.$)
//([a-z]*://)?[^@.:/]*([:/.][^:/.]*)+
//url_pattern = /^[a-zA-Z0-9]{3,}[\/.:]{1}+\S+((com|net|org|edu|gov|mil|htm|jsp|html|asp|[a-zA-Z0-9]{3,}) *$)/i;



//whitespace  /^\s+$/  spaces or tabs etc. 

//single letter  /^[a-zA-Z]$/  a thru z or A thru Z 
 
//single digit  /^\d/  0 thru 9 


//single letter or digit  /^([a-zA-Z]|\d)$/  0 thru 9 or a thru z or A thru Z 


//signed integer  /^(+|-)?\d+$/  -1 or +123
 
//floating point number  /^((\d+(\.\d*)?)|((\d*\.)?\d+))$/  1.2 or .9 or 8. 

//signed float  /^(((+|-)?\d+(\.\d*)?)|((+|-)?(\d*\.)?\d+))$/  -1.1 or 1.1 or .9 or 8. 

