Insert a Regex Token to Change a Matching Mode

The Insert Token button on the Create panel makes it easy to insert the following regular expression tokens to change how the regular expression engine applies your regular expression. These tokens are called mode modifiers.

Mode modifiers are useful in situations where you can't set overall matching modes like you can with the combo boxes on RegexBuddy's toolbar. Mode modifiers are not supported by all applications that support matching modes. But in applications that do, mode modifiers always override modes set outside of the regex (combo boxes in RegexBuddy).

Some regular expression flavors also have mode modifiers to turn off modes, even though all modes are off by default. These flavors allow you to place mode modifiers in the middle of a regex. The modifier will then apply to the remainder of the regex to the right of the modifier, turning its mode on or off. With these flavors, if you select part of your regex before choosing a mode modifier item in the Insert Token menu, RegexBuddy will create a mode modifier span that sets the mode for the selected part of the regex only.

Insert Mode Modifier