in reply to Split and print hash based on regex

Your regex does not capture anything. Shouldn't it be capturing from one "This is" to the next "This is"?

  • Comment on Re: Split and print hash based on regex

Replies are listed 'Best First'.
Re^2: Split and print hash based on regex
by Maire (Scribe) on Mar 27, 2018 at 15:47 UTC
    What I was trying to do is ask it to look for the "This is" and then print that and everything else until the next "This is" (as opposed to capturing the text, as such (if that makes sense!). This method worked successfully in the original script (not using hashes) which I've now reproduced above. However, I will look into using a capturing regex to see if I can get this modified script to work successfully that way instead, thanks!