loadrunner Hiii, Plz tell me, How work 'RegExp' in...

  • perf-test.com need your contributions to build up a strong repository of performance engineering resources.

S

Samyak Mondal

Guest
Hiii, Plz tell me, How work 'RegExp' in 'web_reg_save_param_regexp' function Thanks in advance
 
A regular expression is a search string which enables matching of a string. Think of it as an advance searching function where you can pick out values from a string of multiple characters. Examples of regex: • \d matches a single digit • \w matches a single word (including alphanumeric characters and underscore) • [A-Z]+ matches any word which is upper case • [a-z]+ matches any word which is lower case • [0-9]+ matches any numeric value Imagine having a value of “GraphA123567EndGraphA” and the goal is to correlate 123567. Using web_reg_save_param_regexp will allow the user to grab a correlation value using dynamic left and right boundaries. This function uses the power of regular expressions, as the following example: Source: “GraphA123567EndGraphA” Solution: web_reg_save_param_regexp (“ParamName=CorrValue”, “RegExp=\“Graph[A-Za-z]\”, \“([0-9]+)\”, \“EndGraph[A-Za-z]\””, LAST); Result: 123567
 
When you have something readily available, there is no point in narrating it again... The ultimate goal is to help others by providing the information. Everyone doesn't have the same problem statement.. it is better to provide them with the complete information.