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...

 

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
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

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