cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
CooolinG
New Member

Need help with the RegEx in pva

Hello there, 

Forgive me for maybe asking in the wrong place, but I have been struggling with writing the Regex for what should be a very simple entity in microsoft PVA. 

I'm trying to create an entity that searches for a pattern of 'Z.123456' with the Z being case-insensitive. So far, everything points towards (?i)[Z.][0-9]{6} being the right pattern, but sadly it's only returning the result when I input a lowercase z. I have been trying this for the better part of a week without any succes. What am I doing wrong here?

Thank you in advance

12 REPLIES 12
Pstork1
Dual Super User
Dual Super User

Since you only want the one character to be case insensitive I don't think you want the square brackets around the Z.  This worked for me

(?i)Z.[0-9]{6}


-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Thank you for replying. Unfortunately I am still getting the 'I did not understand that' return when I try this option. That's what's bothering me so much about this, everywhere I look results in me thinking the Regex will work, but once I enter it in PVA it doesn't. 

Could it be something with the specific Regex PVA uses? (Just spitballing, I'm not that good at this)

I tested and it works for me.  Here's my Regex entity

image.png

And here's the testing of the bot with an unsuccessful run and two successful entries.

image.png

 



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
CooolinG
New Member

How strange.. I'll add some screenshots too, to show you what I mean. Excuse it being in another language, but here they are:

My return message. Translated it say something along the lines of: "Unfortunately, I didn't understand that." And then it asks again.

CooolinG_0-1641913220908.png


This is my Entity regex:

CooolinG_1-1641913318047.png


I'm really not seeing what I am doing different from you. Apologies.



Can you show me the configuration of your Regex entity and the authoring canvas where you are checking.  The message is the same as the one I get when I enter a value that doesn't match the regex expression.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
CooolinG
New Member

Is this what you mean by authoring canvas?

CooolinG_0-1641914050863.png


And this by configuration of my regex entity? Pardon me but I'm not an english native so I might misinterprit some things.

CooolinG_1-1641914116463.png

 

CooolinG
New Member

It does recognize results with a lowercase 'z', if that information helps in any way.

It looks like you are using the exact same pattern and steps that I am and it works perfectly for me.  Unless the separators or punctuation are different in Europe, and I don't think it is for Regex, I don't see why its not working for you.  Especially since it recognizes the lower case z but not the Uppercase one.

 

The other pattern you could try would be 

[z,Z].[0-9]{6}

It doesn't use the case insensitive option.  Instead it says it starts with either a z or Z, followed by a period and 6 digits.

 



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
CooolinG
New Member

I suppose I'm just giving up on PVA then. Even your last suggestion does not yield results.. It must be something within my PVA settings, because as we've tested, every solution that SHOULD work, sadly doesn't. Thanks for all your help so far. I hope there's a solution to be found somewhere.

Helpful resources

Announcements
Canadian Cloud 2022 768x460.png

Register for a free PVA chatbot creation workshop.

Learn how to respond rapidly to your customers and employees at scale, using intelligent conversational chatbots.

PVA Community Blog Build Carousel (1) (1).png

What does the community say?

Discover what our community thinks about the announcements at Build 2022.

June 14th PVA AMA Carousel (up on May 25th, take down June 15th) (1).png

'Ask Microsoft Anything' about Power Virtual Agents!

Join the community to ask questions and provide helpful answers about Microsoft's conversational AI and Power Virtual Agents.

Top Solution Authors
Top Kudoed Authors
Users online (1,553)