LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

String Functions Used for Password creation

Solved!
Go to solution

I want to create a string used to input a password. In that I want to put some conditions like follows:

1. String must not me greater than 8 characters.

2. It must contain atleast one Upper case and one Lower case character.

3. It must contain atleast one symbol.

For this i didn't find any direct function so I have completed the program halfway.

Please, see the attahed VI and give some solution if anyone have.

0 Kudos
Message 1 of 11
(4,266 Views)

You only attached the project file, no VIs.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 2 of 11
(4,252 Views)
Solution
Accepted by PoojaMadane

Match Pattern will be your friend here.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 3 of 11
(4,246 Views)

Hi Pooja,

 

1. StringLength function…

2. LexicalClass function

3. first define "symbol", then use LexicalClass or some kind of LUT (LookUpTable)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 11
(4,242 Views)

Try this.

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 5 of 11
(4,212 Views)

Sorry. Here, is the project file.

0 Kudos
Message 6 of 11
(4,189 Views)

Its a really good solution. And you made it too simple.

Thank you.

0 Kudos
Message 7 of 11
(4,185 Views)

@crossrulz wrote:

Match Pattern will be your friend here.

This might just be wanting to optimize things as much as possible, but instead of using pattern matching for the upper and lower case comparison could you not just compare the inputs and outputs after passing the string through "To Upper Case".


Test.png

 

 

Message 8 of 11
(4,179 Views)

This might just be wanting to optimize things as much as possible, but instead of using pattern matching for the upper and lower case comparison could you not just compare the inputs and outputs after passing the string through "To Upper Case".

Test.png


No, it is not enough. Strings with only lower case letters will pass.

0 Kudos
Message 9 of 11
(4,164 Views)

With this solution I want to add some extra points for my project.

1. I want to display a pop-up window if any of the match pattern becomes false.

For this, I have used one button dialogue and showing "string limit exceeded" pop-up.

But, for other conditions like I want to show "There must be atleast one capital letter." for second match pattern function.

Its is malfuntioning in my VI.

Please, give the solution if any.

Download All
0 Kudos
Message 10 of 11
(4,152 Views)