Help Center>
CloudTest>
User Guide>
Test Case>
Advanced Configurations of API Automation>
Advanced Extraction Types>
Regular Expression
Updated on 2023-03-14 GMT+08:00
Regular Expression
Description
When setting checkpoints or response extraction, if the expressions in the property setting bar or the character string extraction function cannot meet the requirements, you can set Advanced Extraction Type to Regular expression.
The Java regular expression engine can be used.
Example
The following response body is used as an example.
- If the checkpoint verifies remoteUrl of the first element in the result array in the response body, obtain the IP value through regular expression matching and compare the value with the target value. The configuration is as follows. Set Type Value to ((2[0-4]\d|25[0-5]|[01]?\d\d?)\.){3}(2[0-4]\d|25[0-5]|[01]?\d\d?).
- If remoteUrl of the first element in the result array in the response body is extracted, obtain the IP value through regular expression matching and assign the value to the variable remoteIp. The configuration is as follows. Set Type Value to ((2[0-4]\d|25[0-5]|[01]?\d\d?)\.){3}(2[0-4]\d|25[0-5]|[01]?\d\d?).
Parent topic: Advanced Extraction Types
Feedback
Was this page helpful?
Provide feedback
Thank you very much for your feedback. We will continue working to improve the
documentation.
The system is busy. Please try again later.
For any further questions, feel free to contact us through the chatbot.
Chatbot