Hi all,
I'm trying to extract part of a string that exists between square brackets [ ]. My function attempt is failing. Can someone help?
substring(triggerBody()?['title'],indexOf('[',triggerBody()?['title']),sub(indexOf(']',triggerBody()?['title']),indexOf('[',triggerBody()?['title'])))
Thanks!
Solved! Go to Solution.
Hi @samuelstevenson,
Could you please share more details about the string that you mentioned and want to extract part of a string from?
Do you have a String such as [1234], and you want to get the 1234 in the string inside the []?
If yes, please refer to screenshot below to create the flow:
The expresion in the Condition 2 as below:
first(split(last(split(string(outputs('Compose')),'[')),']'))
The flow would run successfully as below:
Best regards,
Alice
Hi @samuelstevenson,
Could you please share more details about the string that you mentioned and want to extract part of a string from?
Do you have a String such as [1234], and you want to get the 1234 in the string inside the []?
If yes, please refer to screenshot below to create the flow:
The expresion in the Condition 2 as below:
first(split(last(split(string(outputs('Compose')),'[')),']'))
The flow would run successfully as below:
Best regards,
Alice
Hi Alice,
Thanks! This worked.
If you wouldn't mind, could you please explain why:
Trying to learn from my mistakes. 🙂
Thanks.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
Read the latest about new experiences and capabilities in the Power Automate product blog.
User | Count |
---|---|
6 | |
5 | |
3 | |
2 | |
2 |
User | Count |
---|---|
7 | |
7 | |
6 | |
5 | |
5 |