What are modifiers in regular expression

Posted by Andre Scott | Updated on

Modifiers can be used to perform case-insensitive and global searches. Let’s list down some of the modifiers:

ModifierDescription
iPerform case-insensitive matching
gPerform a global match rather than stops at first match
mPerform multiline matching

Let’s take an example of global modifier,


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers