A lookahead regex syntax can help you to achieve your goal. Thus a regex for your example is
.*?quick.*?(?=z)
And it's important to notice the .*?
lazy matching before the (?=z)
lookahead: the expression matches a substring until a first occurrence of the z
letter.
Here is C# code sample:
const string text = "The quick red fox jumped over the lazy brown dogz";
string lazy = new Regex(".*?quick.*?(?=z)").Match(text).Value;
Console.WriteLine(lazy); // The quick red fox jumped over the la
string greedy = new Regex(".*?quick.*(?=z)").Match(text).Value;
Console.WriteLine(greedy); // The quick red fox jumped over the lazy brown dog