web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Find the Spaces in a S...
Power Apps
Answered

Find the Spaces in a String

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I have a string which may have a space any where.

e.g here : I have a space in the first character and in between words. 

' foot ba ll'

 

I need a formulae to find, if any space exists in my string and remove all spaces if exists.

 

Categories:
I have the same question (0)
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    hi @dsab81 ,

    try this : 

    Substitute(YourString," ","")

     

  • dsab81 Profile Picture
    Microsoft Employee on at

    @Anonymous  Before removing spaces, May i know how do i find, if there is any space in a string ?

    Or

    I need the count of spaces in a string.

  • Verified answer
    zmansuri Profile Picture
    6,048 Super User 2024 Season 1 on at

    a17.jpg

    CountRows(MatchAll("www.hot m a il .com", " "))

     Above formula will count the number of occurrence of the character in a string. In this case. 4 Spaces.

  • dsab81 Profile Picture
    Microsoft Employee on at

    @zmansuri  Thanks. May i know the power automate equivalent of this formulae to get the count of spaces

  • Verified answer
    zmansuri Profile Picture
    6,048 Super User 2024 Season 1 on at

    a19.jpg

     

    sub(length(split(variables('test'),' ')),1)
     
    Please click accept as solution if i have solved your problem. So, it will be helpful for others to find this post.
  • dsab81 Profile Picture
    Microsoft Employee on at

    Works perfectly @zmansuri . Thank you.

  • dsab81 Profile Picture
    Microsoft Employee on at

    Hi @zmansuri Using the same formulae how can i get the count of upper case letters in a string ?

     

    Please provide it here.

    https://powerusers.microsoft.com/t5/Building-Flows/Count-of-Upper-Case-Letters-in-a-String/m-p/939837

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 396 Most Valuable Professional

#2
11manish Profile Picture

11manish 134 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 101 Super User 2026 Season 2

Last 30 days Overall leaderboard