In Ruby, I'm trying to extract from text a string that starts with "who" and ends with the first of either a ")" or "when" (but doesn't include the ")" or the "when").
I've tried the following:
who.*(?=when\b|\))
which fails the case where it finds both a "when" and a ")".
Any ideas?
Many thanks