http://www.perlmonks.org?node_id=772376


in reply to Re: Can we "grow" a string?
in thread Can we "grow" a string?

And, do you think you can put some boundaries too? For example, not let the expanded substring go pass letter C on the left or N on the right?

Replies are listed 'Best First'.
Re^3: Can we "grow" a string?
by citromatik (Curate) on Jun 17, 2009 at 13:23 UTC

    I already gave you some working code to start playing with. I'm sure you can modify it to fit your own needs. You only need to understand how the snippet works. If you are confused by any part of the code, don't hesitate to ask again. Please, show me that you are more interested than me in solving your problem!

    citromatik

Re^3: Can we "grow" a string?
by Corion (Patriarch) on Jun 17, 2009 at 12:48 UTC

    Of course you can, but maybe you should take a step back and try to describe what problem you're trying to solve instead. Most of these solutions will involve writing actual code though, so maybe you can show what code you've written so far and where you encounter problems.

      The boundaries will have been calculated in the script before expanding the "small" substring and i will know that I must go say, 3 letters on the right at most and 4 letters on the left at most... Everything else works fine in the code of citromatik.