# Segment regex with flags?

**URL:** <https://forum.mautic.org/t/segment-regex-with-flags/20888>\
**Category:** Product Support\
**Created:** [September 15, 2021, 4:32pm UTC](https://forum.mautic.org/t/segment-regex-with-flags/20888 "2021-09-15T16:32:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![donbowman](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/donbowman/32/5702_2.png) [@donbowman](https://forum.mautic.org/u/donbowman)\
**Post date:** [September 15, 2021, 4:32pm UTC](https://forum.mautic.org/t/segment-regex-with-flags/20888/1 "2021-09-15T16:32:46Z")

</div>

**Your software**  
My Mautic version is: 4.0  
My PHP version is: 7.4  
My Database type and version is: tidb

**Your problem**

I want to do a case-insensitve regex for segment filter.  
/(chief|clerk|manager|cao)/i

would be what i would expect to do elsewhere.

the regexp match filter in the segment filter screen does not expect the leading slash, or does it accept the trailing slash (it causes it to not match).

Anyone have a suggestion w/o getting into  
([Cc][Ii]…) which is a PITA to type and manage.

e.g. how do i get the /i flag on the end of rthe regex?
