use strict;
my $str = '"11428": {
"item_id": "11428",
"resolved_id": "11428",
"given_url": "http://www.perpetualkid.com/",
"given_title": "Perpetual Kid - Unique Gifts to Entertain Your Inner Child",
"favorite": "0",
"status": "0",
"time_added": "1504308897",
"time_updated": "1523244253",
"time_read": "0",
"time_favorited": "0",
"sort_id": 1185,
"resolved_title": "Fun + Unique gifts for the young at heart! Unusual + affordable gift ideas for guys, girls, mom, dad, kids, and pets!",
"resolved_url": "https://www.perpetualkid.com/",
"excerpt": "At Perpetual Kid, we’ve been dedicated to finding the most fun and unique gifts for over 10 years! Browse our unusual selection of fun and uncommon gifts and gadgets for your own amusement, or to find a lucky gift recipient the perfect present.",
"is_article": "0",
"is_index": "1",
"has_video": "0",
"has_image": "0",
"word_count": "137",
"lang": "en"
},
"13488": {
"item_id": "13488",
"resolved_id": "13488",
"given_url": "http://www.overheardinnewyork.com/",
"given_title": "Overheard in New York | The Voice of the City",
"favorite": "0",
"status": "0",
"time_added": "1504308901",
"time_updated": "1523244252",
"time_read": "0",
"time_favorited": "0",
"sort_id": 1090,
"resolved_title": "Overheard In New York",
"resolved_url": "http://www.overheardinnewyork.com/",
"excerpt": "Woman in leggings: What the fuck is this shit? You gonna hand me three motherfucking sugar packets? Do you have any idea how big this coffee is? Cashier: We don’t put sugar in your coffee. Sugar packets are on the counter. Woman in leggings: Listen, my boyfriend’s a cop.",
"is_article": "0",
"is_index": "1",
"has_video": "0",
"has_image": "1",
"word_count": "642",
"lang": ""
},';
my $regex = qr/sort_id"([\w\W\-_*+.,]+)"sort_id"/mp;
my $subst = '$1';
my $result = $str =~ s/$regex/$subst/rg;
print "The result of the substitution is' $result\n";
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for Perl, please visit: http://perldoc.perl.org/perlre.html