Several Regex Modifiers in PHP
After the delimiter, you can write several modifiers. Example:
<?php
preg_replace('#[a-z]+#iU', '!', 'aaa bbb');
?>
Explain how the modifiers change the behavior of the regex in the following code:
<?php
preg_replace('#[a-z]+#Uu', '!', 'aaa bbb');
?>
Explain how the modifiers change the behavior of the regex in the following code:
<?php
preg_replace('#[a-z]+#Xx', '!', 'aaa bbb');
?>
Explain how the modifiers change the behavior of the regex in the following code:
<?php
preg_replace('#[а-яё]+#ui', '!', 'яяя ЙЙЙ ёёё');
?>