Mega Code Archive

 
Categories / Ruby / String
 

String contains mixed case

string = "This is a test" if string =~ /[A-Z]/ and string =~ /[a-z]/   puts "string contains mixed case" end