Notifications
Announcements
No record found.
Hello. I want to create a restriction that does case insensitive matching. For example, as per docs.microsoft.com/.../regular-expression-language-quick-reference
Pattern \b(?i)a(?-i)a\w+\b
\b(?i)a(?-i)a\w+\b
Matches "aardvark", "aaaAuto" in "aardvark AAAuto aaaAuto Adam breakfast"
"aardvark"
"aaaAuto"
"aardvark AAAuto aaaAuto Adam breakfast"
However when I try this in customer voice I get an error. It doesn't seem to like parenthesis
Hi there,
Customer Voice uses JavaScript Regular Expressions. More details on the patterns can be found here:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions
For example I was able to test the following pattern which tests if the user enters a combination of alphabet followed by a letter:
\w\d
Hope this helps. Curious to understand more of your use-case and the question you are using the regex for - are you trying to check if the user (in his text question response) mentions some specific word?
Thanks Usha
I want to restrict users to input an email address with specific email domain, for example @gmail.com.
If they want to spell gmail.com, or Gmail.com, or GmAiL.CoM shouldn't matter. I'm not sure how to make the gmail and the com as case insensitive. Right now, the following will restrict them literally to gmail.com
^[A-Za-z0-9._%+-]+@gmail.com$
Any help is appreciated. Thanks!
Hey Jason,
We are checking into this and will get back to you shortly.
Can you try the below? You can define what specific domain you want to check against.
^[\w+!#$%&'*+-/=?^_`{|}~.]+\@[gG][mM][aA][iI][lL]([\.])[cC][oO][mM]$
ok that works but it's painful.
why can't we set flags?
^[A-Za-z0-9._%+-]+@(?i)gmail.com$
Hi Jason,
Thanks for confirming! I understand it is a roundabout & time-consuming method.
Currently, we do not support passing flags directly from the regex expression (since technically, the flag is invoked during the regex function invocation). You can submit an idea for CV to provide support for regex flags at aka.ms/customervoiceideas.
We will add it to the backlog and prioritize the feature depending on the popularity of the idea.
ok I submitted the feature request. Please upvote if you agree: experience.dynamics.com/.../
Hi Usha. The keystroke response time is very slow when answering this question. Takes about 2-3 seconds for the characters to appear, Perhaps it's the regex that's causing the slowness. I can send you the example if you want to check it out, let me know.
I tried with the gmail example above, and was working fine. Is the issue persistent? if so, please drop a note with the survey id and the regex over email to usrathna@microsoft.com, so that we can investigate more on this.
Thanks!
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Tom_Gioielli 74 Super User 2025 Season 2
Daniyal Khaleel 32 Most Valuable Professional
Gerardo RenterÃa Ga... 31 Most Valuable Professional