cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dmistry
Post Prodigy
Post Prodigy

allowing numbers but not special characters and space

Hi,

 

i am using an expression below for a sp list connected text box control.

Below is the expression syntax:

"KL-" & DataCardValue35.Selected.Value & DataCardValue36.Selected.Value &"-" & Concat(MatchAll(DataCardValue10.Text, "\p{L}+"),FullMatch)

 

the matchall works perfect and does not allow special characters as well as white space but I need to include numbers/digits from 0-9. Can someone help how I should modify to allow numbers? Many thanks in advance. 

1 ACCEPTED SOLUTION

Accepted Solutions
GarethPrisk
Resident Rockstar
Resident Rockstar

Tweaking one of the samples:

Concat(
    MatchAll(
        DataCardValue10.Text,
        "(?!^[0-9]\*$)(?!^[a-zA-Z]\*$)([a-zA-Z0-9])"
    ),
    FullMatch
)

This was the 'strong password' example, without the 8-10 character requirement. This will require an alphabet character, and a digit, but could be tweaked as needed.

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-ismatch#regular-expr...

 

View solution in original post

2 REPLIES 2
GarethPrisk
Resident Rockstar
Resident Rockstar

Tweaking one of the samples:

Concat(
    MatchAll(
        DataCardValue10.Text,
        "(?!^[0-9]\*$)(?!^[a-zA-Z]\*$)([a-zA-Z0-9])"
    ),
    FullMatch
)

This was the 'strong password' example, without the 8-10 character requirement. This will require an alphabet character, and a digit, but could be tweaked as needed.

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-ismatch#regular-expr...

 

View solution in original post

v-xiaochen-msft
Community Support
Community Support

Hi @dmistry  ,


Has the problem been solved?
Is there anything else I can help?

 

Best Regards,

Wearsky

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (2,028)