lib/barby/barcode/code_128.rb
def extract_codec(data)
        data.split(/
          (^(?:#{CODEC_CHARS_RE})) # matches digits that appear at the beginning of the barcode
          |
          ((?:#{CODEC_CHARS_RE})(?!\d)) # matches digits that appear later in the barcode
        /x).reject(&:empty?)
      end
#Extract all CODEC segments from the data. 4 or more evenly numbered contiguous digits.
#
#  #                                        C       A or B  C         A or B
#  extract_codec("12345abc678910DEF11") => ["1234", "5abc", "678910", "DEF11"]
Extract all CODEC segments from the data. 4 or more evenly numbered contiguous digits.
Extract all CODEC segments from the data . 4 or more evenly numbered contiguous digits .
def extract_codec(data)
        data.split(/
          (^(?:#{CODEC_CHARS_RE})) # matches digits that appear at the beginning of the barcode
          |
          ((?:#{CODEC_CHARS_RE})(?!\d)) # matches digits that appear later in the barcode
        /x).reject(&:empty?)
      end
def extract_codec ( data ) data . split ( / 
          (^(?: #{ CODEC_CHARS_RE } )) # matches digits that appear at the beginning of the barcode
          |
          ((?: #{ CODEC_CHARS_RE } )(?! \d )) # matches digits that appear later in the barcode
         /x ) . reject ( & :empty? ) end
Extract all CODEC segments from the data.
Extract all CODEC segments from the data .
data