Understanding the rex Operator Syntax

Extract all information after text1 and until text2 that matches the specified regex (regular expression) and assign to field1.