in reply to Get chars between 2 markers using regular expressions

You need to do a couple of things here. Match and capture. You have already started the match part with the m// construct (although the m is not required). You need to match the start and end and capture everything in between. You capture a value using parentheses around a pattern.

The following code is commented by virtue of the x modifier. Take a look at perlre for details.

my @matches = / He\d #Match 'He' followed by a single digit. (.+?) #Capture characters non-greedily ~~ #until the end marker is reached /gx; #The g modifier matches multiple instances #into the @matches list