Meaning of Regex modifiers in pattern - "s", "m", "i", "U"

Would you please explain the functions of regex modifiers s, m, i and U ? What they do in the pattern ?
0
give a positive ratinggive a negative rating
Hi,

s - pattern also matches newlines

m - used to perform a multiline match

i - pattern matches both upper and lower case letters, case insensitive

U - inverts the "greediness" of matching
Share on FacebookShare on TwitterShare on LinkedInSend email
1 answer
x
x
2026 AnswerTabsTermsContact us