How to use modifier in regular expression (?...) construct

Post Reply
dangman9
Posts: 1
Joined: 30 Aug 2024, 12:19

How to use modifier in regular expression (?...) construct

Post by dangman9 »

The documentation says
Modifiers can be embedded within the Regular Expression itself using the (?...) construct.
I'm struggling to figure out what exactly this construct looks like. I'd like to embed case insensitive into an "Included URL" regex. I've tried a few things such as (?i...), (?/i...), (?...)/i, (?.../i) but none of them seem to work. An example would be helpful in the documentation.
Maksym
Site Admin
Posts: 2217
Joined: 02 Mar 2009, 17:02

Re: How to use modifier in regular expression (?...) construct

Post by Maksym »

Like this:

(?i)your_reg_ex_here

or this:

(?im)your_reg_ex_here
Post Reply