cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

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 @Anonymous  ,


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

 

Best Regards,

Wearsky

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on June 15, 2022 at 8am PDT.

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

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