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 Apps
Unanswered

chemical formula

(0) ShareShare
ReportReport
Posted on by 2

Hello,

I want to view in HtmlText a chemical formula. I found this Topic : https://powerusers.microsoft.com/t5/Building-Power-Apps/Formula-help/m-p/612121#M193042, It's very good, but it's not complete. I modify the regexp, and it's Ok on http://regexstorm.net/tester site, but when i use it in PowerApps it's don't work, only the first number is converted

 

Substitute(
 ipt_texte.Text; 
 First(
 MatchAll(
 ipt_texte.Text; "(?<IdNumber>(?<=([A-Za-z]|\)))\d+)")
 ).FullMatch;"<sub>"
 & 
 First(
 MatchAll(
 ipt_texte.Text; "(?<IdNumber>(?<=([A-Za-z]|\)))\d+)")
 ).FullMatch
 & "</sub>"
 )

 

 i want : 2H3PO4,6H2O to be converted in 2H<sub>3</sub>PO<sub>4</sub>,6H<sub>2</sub>O

And 2(Na3HPO4)6 to be converted in 2(Na<sub>3</sub>PO<sub>4</sub>)6

Thank you very much and sorry for my very bad english

Dom

Categories:
  • dragon-do64 Profile Picture
    2 on at

    Nobody can help me ? 😢

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 220 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 189 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 139

Last 30 days Overall leaderboard