Module: Istox::RegexHelper

Defined in:
lib/istox/helpers/regex_helper.rb

Class Method Summary collapse

Class Method Details

.alphabet_only(input) ⇒ Object



3
4
5
# File 'lib/istox/helpers/regex_helper.rb', line 3

def self.alphabet_only(input)
  !input.match(/\A[a-zA-Z]*\z/).nil?
end

.symbol_only(input) ⇒ Object



7
8
9
# File 'lib/istox/helpers/regex_helper.rb', line 7

def self.symbol_only(input)
  !input.match(/\A[^\w\s*]+\z/).nil?
end