Is Alphanumeric

Check if a string contains only letters and numbers.

Code

General
!!(str =~ /^[a-zA-Z0-9]+$/)

Parameters

The string to check

Server

More Ruby Snippets