You can use the look-behind or look-ahead assertions to demand a targeted match to be met (you may want to read up on those assertions to gain understanding of how they work) , while the
(?U)
,
(.+?)
and
/U
are telling regex to match as few strings as possible, being less greedy. Regex by design is greedy and case-sensitive.