Regular Expressions Regex modifiers (flags) PCRE_UNGREEDY modifier


Example

The PCRE-compliant PCRE_UNGREEDY flag expressed with /U. It switches greediness inside a pattern: /a.*?b/U = /a.*b/ and vice versa.