cancel
Showing results for 
Search instead for 
Did you mean: 
m_k
Nintex Newbie

Regular Expression Match

Jump to solution

Hi everyone,

I have a test column for now to check if the input password matches that of the criteria specified. The workflow is a site workflow and for the purpose of this post, I have only 1 variable called "Test Column" where password will be entered.

This is the configuration for the Regular Expression:

Boolean default to Yes.

Criteria for password are:

- At least 1 Upper case

- 1 At least 1 Lower case

- At least 1 special character

- At least 1 number

- No length requirement

And this is the workflow - PS: This is a test one for your reference:

In the Set Variable: Boolean = Workflow Data: string_Variable

In the Set a Condition: Test Column = string_Variable

Send notification if No: Wrong Password

Send notification if Yes: Right password

The behaviour I get is only Wrong password, even when it fits criteria.

What am I missing?

0 Kudos
Reply
24 Replies
mapeacock
Nintex Newbie

Re: Regular Expression Match

Jump to solution

Hi M K,

It looks to me like you are not introducing your password into the evaluation. What you have in the input text should surely be placed in the Pattern section and the input text should be set to your password value that you want to assess - unless I am misunderstanding what you are trying to achieve?

Cheers,

Mark

View solution in original post

0 Kudos
Reply
m_k
Nintex Newbie

Re: Regular Expression Match

Jump to solution

Hi Mark,

Thanks for your help. I think your understanding is point. I'm unsure, however, of what to put in the input text. I had thought it would be the input variable "Test Column"(?)

0 Kudos
Reply
mapeacock
Nintex Newbie

Re: Regular Expression Match

Jump to solution

Hi,

You would definitely want the text that you want to assess in the input text field, so yes, this should be "Test Column". So insert that into the input text field and put your match pattern in the pattern field. Use the "Run Now" function on the control to test your outcome.

Cheers,

Mark

0 Kudos
Reply
m_k
Nintex Newbie

Re: Regular Expression Match

Jump to solution

Hmm... it doesn't seem to work, as it gives me "False" outcome when I Run Now - Even though my entry fits the criteria being set.

0 Kudos
Reply
m_k
Nintex Newbie

Re: Regular Expression Match

Jump to solution

Do you think the Regex I'm using is causing some issues with the outcome? Would it help if I build it into a string and use that variable in the Pattern instead?

0 Kudos
Reply
mapeacock
Nintex Newbie

Re: Regular Expression Match

Jump to solution

While not using the same regex as you, I appear to have it working on the following Run Now:

This regex checks for 1 number, 1 upper case, 1 lower case, 1 symbol and a minimum size of 6 and max of 255. Do you want to paste your regex so I can copy it? It possibly looks too complex.

Cheers,

Mark

0 Kudos
Reply
m_k
Nintex Newbie

Re: Regular Expression Match

Jump to solution

Certainly, thank you so much!

I've been testing a few actually, but below is what I'm currently trying to use:

"^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[$@$!%*?&])[A-Za-z\d$@$!%*?&]{8,}"

0 Kudos
Reply
mapeacock
Nintex Newbie

Re: Regular Expression Match

Jump to solution

Yes, that one does not appear to work. Some of the ones I have tested appear to work, but not necessarily for Special characters. It will be a matter of finding something to suit. I'm sorry, but I am not a RegEx expert by any stretch.

Cheers,

Mark

0 Kudos
Reply
m_k
Nintex Newbie

Re: Regular Expression Match

Jump to solution

Thanks very much for your help Mark.

May I steal your Regex please?

0 Kudos
Reply