Idea ID: 2873931

Advance Regular expression library is required

Status : Already Offered

This is already supported as per my comments below.

If you are still running into any issues please log a support ticket and our team will investigate.


See status update history

we've been having troubles with using regular expression that uses special characters such as &$%*[] 

as we're not sure which characters need to be treated differently. when we were testing it, we were using a tool called regex101.com which allows us to test out regular expressions. 

when our script was failing to find the correlation using the regular expression we created, we decided to use this tool and put the response body of where we were expecting to capture the correlation as the sample text and then using the regular expression we were using, it was able to find the correlations with out any problem. 

so we're feeling like load runner is using a different library or different definitions than what normal regular expressions are using. we know this to be true because we noticed that LR doesnt allow us to use {}  to create ranges as this is used to depict variables in load runner. so what other differences are there that we should know about? 

Tags:

Labels:

Protocols
  • Hi there Jay
    We have verified that we do support  “special” characters in regexp…
    Such characters probably should be surrounded with [].

    Please, see the examples below:

    char * buffer = "&$%*[]qwerty&$%*[]";
    lr_save_param_regexp (
    buffer,
    strlen(buffer),
    "RegExp=[&][$][%][*][[][]](.+)[&][$][%][*][[][]]",
    "ResultParam=output",
    LAST );
    lr_message(lr_eval_string("{output}")); 

     "RegExp=[&][$][%][*][[][]]([a-z]{6})[&][$][%][*][[][]]",

    If you are still having issues please log a support ticket and the team will investigate further.