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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Regular expression to ...
Power Automate
Unanswered

Regular expression to replace periods

(0) ShareShare
ReportReport
Posted on by

Hi,

 

I'm doing web scraping with PAD and I need to write a regular expression to replace commas for empty spaces in every price extracted.

 

I'm looking for some help here...

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

    Hi @Anonymous 

    Use 'Replace Text' action.

    Text to parse = your price as variable

    Text to find = ,

    Replace with = %' '%

  • Community Power Platform Member Profile Picture
    on at

    Hi,

     

    I've already done that but what I really need is to write a regex expression inside the web data extraction window...

     

    diogoamorim_0-1626260632867.png

     

  • Riyaz_riz11 Profile Picture
    3,891 Super User 2025 Season 2 on at

    Hi @Anonymous 

     

    Use Replace Text action and Text to parse = pass your price  variable

    Replace with = %' '%

    Text to find = ,

     

    If it works mark as solution and like it so it will helpful even others also.

     

    Regards

    Ahammad Riyaz

     

  • Community Power Platform Member Profile Picture
    on at

    Hi yasunm02,

     

    I've already done that and it works, but what I really need is to write a regex expression inside the web data extraction window:

     

    diogoamorim_1-1626336371461.png

     

    Can you help me?

  • Community Power Platform Member Profile Picture
    on at

    Sorry Diogo, i'm not familiar w/ regex expressions🙁...

    Boa sorte

  • tkuehara Profile Picture
    667 on at

    Hi @Anonymous 

     

    As far as I know about regex you use it like a "select query on a string", meaning you'll select/filter the relevant chars from a string. In other words, you can't modify/change contents (at least, I've never seen that kind of implementation PURELY using regex). What I've seen a lot of times is a conjunction of regex with Javascript for the replace part.

    That being said, what you could try to do is to retrieve all data as is and then transform the data table in a later stage in order to replace commas for a blank space between the thousand or decimal separator (don't know which system you are using) as already mentioned by others here. Please notice you'll lose your data table structure if you try to directly replace values because replace action expects a string and will return a string. If you need to maintain your data table structure, you have to:

    1. Use replace to generate a string (let's name it replaced) with the replaced value from data_table[row_index][column_index]
    2. Use set variable to update the data_table[row_index][column_index] with the replaced value

    Something similar to this:

    tkuehara_1-1626371508034.png

    Sample source and data table after replacing values:

    tkuehara_0-1626371471937.pngtkuehara_2-1626371585891.png

     

    Still, I don't see much use cases why you would want to do that because usually when we want to retrieve a value from a data table we do it by reading row by row (and by doing so most of the times you will create a variable, working with a copy of the data table data). The only reason I can see a need for a change in the actual data table values is when you want to update a csv file. I've done it by applying the technique mentioned above.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard