module Coo::Helper::RegexpCollection
Public Class Methods
n_a_1()
click to toggle source
@return [单个 number alphabet]
# File lib/coo/helper/regexp_collection.rb, line 15 def self.n_a_1 return /^[0-9A-Za-z]$/ end
n_a_u_h_0_n()
click to toggle source
@return [0个或多个 number alphabet undlerline hyphen]
# File lib/coo/helper/regexp_collection.rb, line 6 def self.n_a_u_h_0_n return /^[A-Za-z0-9_-]*$/ end
n_a_u_h_1_n()
click to toggle source
# File lib/coo/helper/regexp_collection.rb, line 10 def self.n_a_u_h_1_n return /^[A-Za-z0-9_-]+$/ end
Public Instance Methods
valid_str?(str, valid_regexp)
click to toggle source
# File lib/coo/helper/regexp_collection.rb, line 19 def valid_str?(str, valid_regexp) return true if (valid_regexp.match(str)) false end