What is the syntax for this? I have 6.1.1 in place.
Here is a tidbit of perl from a link provided by David Barr that provides capture functionality.
Here it is in Perl:
$dbh->func(‘capture’,2,sub {
my($regex,$string) = @_;
my($capture) = $string =~ /$regex/;
return $capture;
}, ‘create_function’);
# get month from YYYY/MM/DD format where month or day could be one or two digits
my $row = $dbh->selectrow_arrayref(
“SELECT CAPTURE(‘\d{4}/(\d{1,2})/\d{1,2}’, date_created) FROM invoices”
);