++ed by:
KLEE JONASS VOJ

3 PAUSE users
8 non-PAUSE users.

Nicolas Steenlant
and 16 contributors

NAME

Catmandu::Fix::parse_text - parses a text into an array or hash of values

SYNOPSIS

    # date: "2015-03-07"
    parse_text(date, '(\d\d\d\d)-(\d\d)-(\d\d)')
    # date: 
    #    - 2015
    #    - 03
    #    - 07 

    # date: "2015-03-07"
    parse_text(date, '(?<year>\d\d\d\d)-(?<month>\d\d)-(?<day>\d\d)')
    # date:
    #   year: "2015"
    #   month: "03" 
    #   day: "07"

    # date: "abcd"
    parse_text(date, '(\d\d\d\d)-(\d\d)-(\d\d)')
    # date: "abcd"

SEE ALSO

Catmandu::Fix

Catmandu::Importer::Text