How to Use Regular Expressions in an IF Statement

I’m trying to figure out how I can detect if a variable contains special characters in APIDog. Specifically, I want to use a regular expression (regex) within an IF statement to check if the value of the variable includes any special symbols. Does anyone know how to properly implement this in APIDog? Any advice or examples would be greatly appreciated!

As the image it doesn’t work

Here is an example.
image.png
image.png

Thank you for your assistance, Emily! We would also like to ask how to use contains in an IF statement. In what situations can it be used to achieve higher efficiency? I looked through the documentation but couldn’t find specific usage methods for this conditional statement.

Contains is utilized in IF statements for efficient filtering of test cases or verification of dependencies, supporting checks with variables and direct string values. Thank you for the feedback; we will include more examples in the documentation later.

Thanks you for help!

Please let me know after you guys include more examples

Hi Aiden, we have updated the document, you can check here: Flow control conditions - Apidog Docs

Thank you so much for your prompt response and assistance in supplementing the documentation I needed! The detailed explanation and support you provided have been incredibly helpful, especially regarding how to use the contains conditional in an IF statement. This has greatly improved my understanding of how to achieve higher efficiency.

I truly appreciate your help and look forward to collaborating with you again in the future!