in reply to Default value for capture in regular expression

In cases like these I forego regexps for some kind of data language, such as Perl itself or JSON. I'd set up my defaults as a hash, then read a JSON object from a string (or a file, or wherever), then do a "hash slice" to override the defaults.
my %stuff = ( Title => 'some default', What => 'some default', 'Date added' => 'some default', Data => 'some default' ); use JSON; my $newstuff = jsonToObj( <<STRING ); { "Title": "Gone With The Wind", "Date added": "January 16th, 2006 ( an optional source )" } STRING @stuff{keys %$newstuff} = values %$newstuff;