in reply to Re: regex code embedding problem?
in thread regex code embedding problem?

Well, for one, I wasn't seeking a true/false value from the regular expression; I'm simply using the engine to do some dirty work. The question I have really hasn't been answered even if the code you posted works. I'd like to know why the hash is cleared upon exiting the regex, when it is quite obviously (or so I think) populated upon successful matching of the lookbehind, matching pattern, and then lookahead.

I know that embedded code in a regex is experimental. The code I'm writing is write once, execute once, and then never look at again. I generally don't write code like this, especially not in production, but when I came across what I felt was something strange, I simplified the code down to what I felt to be the simplest case that generated the problem, and then asked about it.