in reply to Re^5: How can I expand my substring?
in thread How can I expand my substring?

Hi there!
I was wondering, how can we modify the regexp so as the "expansion" of the BBB label is done for a maximum of 200 positions to the left and to the right (and not till we reach the N label)?

Replies are listed 'Best First'.
Re^7: How can I expand my substring?
by Corion (Patriarch) on Jul 22, 2014 at 13:11 UTC

    You could play around with the length $1 expression and try to limit that, but I'm not sure what corner cases would be relevant.

    See perlop on how s///e works.

      Thanks again, is it possible to break your code down a bit?
      Like in using more lines I mean, so I can then use and if clause in limiting the length $1 as you suggest...

        Sorry, but I won't do your programming for you.