The U and the i are listed after delimiters. These are known as modifiers in that they modify how PCRE operates to some degree. They can also be listed next to each other as in the example you mentioned.
For example:
PHP Code:
<?php
$text = "text--hn-tact-----hn---tact";
$text=preg_replace('/(teXt).*?(tact)/Ui','',$text);
echo "$text";
?>
the result is an empty string.
This will look for the word text or TEXT or TeXt all the way up to the word tact. normally .*? will match everything from "text" to the very next "tact" it comes across, but in this example the quantifier greediness has been inverted, so the ? will now match up to the last tact instead. I usually don't bother with the /U modifier.
/U = inverts the greediness of the quantifiers.
/i = makes it case insensitive.
They are placed after the delimiter and before the ending quote and are case sensitive.
You can read more on modifiers here.
Pretty much everything else can be found here.
I added the extra info for whoever is curious
Bookmarks