#!/usr/bin/env perl

use feature 'say';

use Data::Dumper 'Dumper';
use Data::Object 'data_regexp';

my $re  = data_regexp qr{is};
#my $res = $re->search('this is a test of matching')->named_captures;
#my $res = $re->replace('this is a test of matching', 'love')->count;
#my $res = $re->search('this is a test of matching')->captures;
my $res = $re->replace('this is a test of matching', 'love')->matched;

say Dumper $res;
