# frozen_string_literal: true module Dolos module CommonParsers def ws regex(/\s/) end def eol regex(/\n|\r\n|\r/) end # Capture as String and convert to integer def digit regex(/\d/).capture!.map { |capt| capt.map(&:to_i) } end # Capture as string def digits regex(/\d+/) end def alpha_num regex(/[a-zA-Z0-9]/) end def alpha regex(/[a-zA-Z]/) end end end