use strict;
my $str = '{"version":2,"(sectionConfig)":{"SECT:1236":{"children":{"ELE:1826":{"children":{"ELE:4217":{"(isHidden)":true},"ELE:22043":{"isHidden":true},"ELE:4253":{"isHidden":true},"ELE:1796":{"isHidden":true},"ELE:3907":{"isHidden":true}},"defaultSelectionId":"ELE:1781"},"ELE:1850":{"defaultSelectionId":"ELE:2657"},"ELE:1832":{"children":{"ELE:602":{"isHidden":true},"ELE:3864":{"isHidden":true},"ELE:650":{"isHidden":true}},"defaultSelectionId":"ELE:605"},"ELE:3711":{"isHidden":true}}},"SECT:2789":{"children":{"ELE:3923":{"isHidden":true},"ELE:3932":{"isHidden":true},"ELE:3920":{"isHidden":true},"ELE:3929":{"isHidden":true},"ELE:3938":{"isHidden":true},"ELE:3917":{"isHidden":true},"ELE:3926":{"isHidden":true},"ELE:3935":{"isHidden":true},"ELE:2834":{"isHidden":true},"ELE:2837":{"isHidden":true},"ELE:2960":{"isHidden":true},"ELE:2675":{"isHidden":true},"ELE:2933":{"isHidden":true},"ELE:2690":{"isHidden":true},"ELE:2717":{"isHidden":true},"ELE:3011":{"isHidden":true},"ELE:2681":{"isHidden":true},"ELE:2723":{"isHidden":true},"ELE:2693":{"isHidden":true},"ELE:2795":{"isHidden":true},"ELE:3014":{"isHidden":true},"ELE:2708":{"isHidden":true},"ELE:2975":{"isHidden":true},"ELE:2729":{"isHidden":true},"ELE:2996":{"isHidden":true},"ELE:2987":{"isHidden":true},"ELE:2672":{"isHidden":true},"ELE:2684":{"isHidden":true},"ELE:2669":{"isHidden":true}}},"SECT:2531":{"children":{"ELE:1862":{"children":{"ELE:26661":{"isHidden":true},"ELE:26682":{"isHidden":true},"ELE:26631":{"isHidden":true},"ELE:26601":{"isHidden":true}},"defaultSelectionId":"ELE:647"},"ELE:2690":{"isHidden":true},"ELE:2637":{"isHidden":true},"ELE:2485":{"isHidden":true},"ELE:1832":{"children":{"ELE:650":{"isHidden":true},"ELE:602":{"isHidden":true}},"defaultSelectionId":"ELE:605"},"ELE:2599":{"isHidden":true},"ELE:2521":{"isHidden":true},"ELE:1826":{"children":{"ELE:27478":{"isHidden":true},"ELE:27469":{"isHidden":true},"ELE:27460":{"isHidden":true},"ELE:27445":{"isHidden":true},"ELE:27436":{"isHidden":true},"ELE:27427":{"isHidden":true},"ELE:1796":{"isHidden":true},"ELE:4217":{"isHidden":true},"ELE:22043":{"isHidden":true},"ELE:27115":{"isHidden":true},"ELE:3907":{"isHidden":true}},"defaultSelectionId":"ELE:1781"}}}}}
regexEdit tags';
my $regex = qr/(?<="ELE:)\d+(?=":{"isHidden":true})/mp;
if ( $str =~ /$regex/g ) {
print "Whole match is ${^MATCH} and its start/end positions can be obtained via \$-[0] and \$+[0]\n";
# print "Capture Group 1 is $1 and its start/end positions can be obtained via \$-[1] and \$+[1]\n";
# print "Capture Group 2 is $2 ... and so on\n";
}
# ${^POSTMATCH} and ${^PREMATCH} are also available with the use of '/p'
# Named capture groups can be called via $+{name}
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