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 Automate / Regex match in UI sele...
Power Automate
Unanswered

Regex match in UI selector not working

(0) ShareShare
ReportReport
Posted on by 55

Hello

 

The UI elements change depending on the situation.
*The numbers change randomly.

Ex)

form[Method="post"][Name="main"] > table > tbody > tr > td > font > input[Name="options[reportOptions][15][interests]"][Value="1"]
form[Method="post"][Name="main"] > table > tbody > tr > td > font > input[Name="options[reportOptions][296][interests]"][Value="1"]


So, I tried to modify the selector using the Regular Expression Match Operator as follows, but I am consistently encountering an error.

form[Method="post"][Name="main"] > table > tbody > tr > td > font > input[Name@="options\[reportOptions]\[\\d\+]\[interests]"][Value="1"]

 

I've tested it dozens of times to see if it's a special text problem, but it hasn't worked. I have no idea what the problem is.

Is there any mistake in what I did?

Best Regards.

I have the same question (0)
  • UshaJyothiKasibhotla Profile Picture
    225 Moderator on at

    Use parse text and insert the patten giving the input then that variable you need to pass in the selector.

     

    Hope this helps

    Usha

  • song_coach Profile Picture
    55 on at

    @UshaJyothi20 

    I tested it according to your advice.
    \d+ doesn't seem to apply.

     

    Case1
    1. Escape text for regular expression
    input : options[reportOptions][15][interests]
    output : EscapedText

    2. Ui element Selector
    form[Method="post"][Name="main"] > table > tbody > tr > td > font > input[Name="%EscapedText%"][Value="1"]

    3. Test Result
    Success

     

    Case2
    1. Escape text for regular expression
    input : options[reportOptions][/d+][interests]
    output : EscapedText

    2. Ui element Selector
    form[Method="post"][Name="main"] > table > tbody > tr > td > font > input[Name="%EscapedText%"][Value="1"]

    3. Test Result
    Fail

     

    Case3
    1. Escape text for regular expression
    input : options[reportOptions][/d+][interests]
    output : EscapedText

    2. Ui element Selector
    form[Method="post"][Name="main"] > table > tbody > tr > td > font > input[Name@="%EscapedText%"][Value="1"]

    3. Test Result
    Fail

     

    I need additional advice.

    Best Regards.

  • UshaJyothiKasibhotla Profile Picture
    225 Moderator on at

     variable should be without double quotes 

    form[Method="post"][Name="main"] > table > tbody > tr > td > font > input[Name=%EscapedText%][Value="1"]

    3. Test Result

  • song_coach Profile Picture
    55 on at

    @UshaJyothi20 

    Case4
    1. Escape text for regular expression
    input : options[reportOptions][15][interests]
    output : EscapedText

    2. Ui element Selector
    form[Method="post"][Name="main"] > table > tbody > tr > td > font > input[Name=%EscapedText%][Value="1"]

    3. Test Result
    Fail

     

    Case5
    1. Escape text for regular expression
    input : options[reportOptions][/d+][interests]
    output : EscapedText

    2. Ui element Selector
    form[Method="post"][Name="main"] > table > tbody > tr > td > font > input[Name=%EscapedText%][Value="1"]

    3. Test Result
    Fail

     

    Case6
    1. Escape text for regular expression
    input : options[reportOptions][15][interests]
    output : EscapedText

    2. Ui element Selector
    form[Method="post"][Name="main"] > table > tbody > tr > td > font > input[Name@=%EscapedText%][Value="1"]

    3. Test Result
    Fail

     

    When comparing case 1 and case 4 I think it's right to put in double quotes.
    Still don't know how to use /d+.

     

  • UshaJyothiKasibhotla Profile Picture
    225 Moderator on at

    Hi @song_coach  try this

    form[Method="post"][Name="main"] > table > tbody > tr > td > font > input[Name="options[reportOptions][%EscapedText%][interests]"][Value="1"]

     

    Hope this helps

    Usha

  • song_coach Profile Picture
    55 on at

    @UshaJyothi20 

    Case7
    1. Escape text for regular expression
    input : 15
    output : EscapedText

    2. Ui element Selector
    form[Method="post"][Name="main"] > table > tbody > tr > td > font > input[Name="options[reportOptions][%EscapedText%][interests]"][Value="1"]

    3. Test Result
    Success

     

    Case8
    1. Escape text for regular expression
    input : /d+
    output : EscapedText

    2. Ui element Selector
    form[Method="post"][Name="main"] > table > tbody > tr > td > font > input[Name="options[reportOptions][%EscapedText%][interests]"][Value="1"]

    3. Test Result
    Fail

     

    Case9
    1. Escape text for regular expression
    input : /d+
    output : EscapedText

    2. Ui element Selector
    form[Method="post"][Name="main"] > table > tbody > tr > td > font > input[Name@="options[reportOptions][%EscapedText%][interests]"][Value="1"]

    3. Test Result
    Fail

     

    Still don't know how to use /d+.

    Best Regards.

     

  • ldidu Profile Picture
    2 on at

    Check if the output/EscapedText is stored as a text or numerical value. I am not sure if this is relevant in this specific context though but it is worth a try. 

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 605

#2
Valantis Profile Picture

Valantis 340

#3
11manish Profile Picture

11manish 284

Last 30 days Overall leaderboard