Hey. Happy Monday!
So, my use case is the following.
I have a variable that is captured from another system. Let’s say INFO123.
I want to create a call triggered by this system informing two things:
1 - the code itself (INFO123)
2 - what I want to have removed (INFO)
So, I would expect this:
If the call has “INFO123” and “INFO”, the original system should receive back 123.
If the call has “INFO 123” and “INFO”, the original system should receive back 123.
If the call has “INFO” and “INFO,” the original system should receive back empty or something that represents anything other than INFO was found.
I tried to do this with the AI as a helper. But it didn’t. But because it said I would need to use PARSER, I am here.
Any help?
Welcome to the Make community!
You can use the built-in function replace
e.g.:
{{replace("INFO123"; "INFO"; emptystring)}}
Output
For more information, see the function documentation in the Help Center.
Hope this helps! Let me know if there are any further questions or issues.
— @samliew
Very interesting, @samliew. Thanks for your reply.
A few questions I have. I hope you can help me.
I create the following scenario. The idea is to send the outcome back to Manychat.
I hope it’s the best approach.
Questions:
I want to cover INFO123, INFO 123 and Info123.
When I use your suggestion with these examples, I get:
- 123
- _123 (where _ is a space)
- Info123 (no cleaning at all)
Ideas for me?
Welcome to the Make community!
You can use the built-in function replace
e.g.:
{{replace("INFO123"; "/[-_,. ]?info[-_,. ]?/i"; emptystring)}}
For more information, see the function documentation in the Help Center.
Hope this helps! Let me know if there are any further questions or issues.
— @samliew
P.S.: Did you know, the concepts of about 70% of questions asked on this forum are already covered in the Make Academy. Investing some effort into it will save you lots of time and frustration using Make later!
2 Likes
Just wonderful, @samliew Thanks a lot!
No problem, glad I could help!
1. If anyone has a new question in the future, please start a new thread. This makes it easier for others with the same problem to search for the answers to specific questions, and you are more likely to receive help since newer questions are monitored closely.
2. The Make Community guidelines encourages users to try to mark helpful replies as solutions to help keep the Community organized.
This marks the topic as solved, so that:
- others can save time when catching up with the latest activity here, and
- allows others to quickly jump to the solution if they come across the same problem
To do this, simply click the checkbox at the bottom of the post that answers your question:
3. Don’t forget to like and bookmark this topic so you can get back to it easily in future!
Hope this helps! Let me know if there are any further questions or issues.
— @samliew
P.S.: Did you know, the concepts of about 70% of questions asked on this forum are already covered in the Make Academy. Investing some effort into it will save you lots of time and frustration using Make later!