logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

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

Name

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

See Also

       Catmandu::Fix

       Catmandu::Importer::Text

perl v5.40.0                                       2025-01-17                     Catmandu::Fix::parse_text(3pm)

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