Explain how to use Regular Expression in Load Runner for web functions?
- By using a function Regexec(), regular expression in Load Runner is used. There are two parameters, the subject and the pattern. These two parameters are passed to the function through the script. The comparison of pattern and the subject is done by Regexec() and the script is executed to view the result.
- A function can be written in Load runner script to check if a pattern matches against a given subject or not. The pattern and subject can be passed as parameters to the function. Regexec() can be used to compare the subject with the pattern. This script can be then executed to see the results.
Example:Pattern is: - b(c(.*))e
Subject: abcdef
Result: 1 (match found)