Module: PositiveStringSupport::RegexpLibrary

Defined in:
lib/positive_string_support/regexp_library.rb

Class Method Summary collapse

Class Method Details

.regexp_for_parentheses_enObject



15
16
17
# File 'lib/positive_string_support/regexp_library.rb', line 15

def regexp_for_parentheses_en
  /([\(\<\|].+[\|\>\)])\Z/
end

.regexp_for_parentheses_jaRegexp

括弧に対する正規表現(日本語)

Returns:

  • (Regexp)


11
12
13
# File 'lib/positive_string_support/regexp_library.rb', line 11

def regexp_for_parentheses_ja
  /([\((〈\|【].+[】\|〉)\)])\Z/
end

.regexp_for_quotationRegexp

quotation に対する正規表現

Returns:

  • (Regexp)


21
22
23
# File 'lib/positive_string_support/regexp_library.rb', line 21

def regexp_for_quotation
  /('.+')$/
end

.string_of_hour_and_minObject



5
6
7
# File 'lib/positive_string_support/regexp_library.rb', line 5

def string_of_hour_and_min
  /\A( ?\d|\d{1,2})\:(\d{2})\Z/
end