in reply to Re^4: String contents
in thread String contents

So in generalizing it you regressed. That happens. You could revert to your previous regexp, and then start again at trying to generalize it, but this time keeping closer track of the spaces, word characters, etc.

It doesn't seem to me that the more complicated solution (this most recent one) is actually superior. It's just more confusing. When regexps start getting too confusing, it's time to try again, or to break the problem up into smaller chunks. ...and of course it's also time for the "/x" modifier. :)


Dave