1. Add a regular expression extractor to your request and extract all (use -1 as match no as shown below).
  2. To the test plan add a beanshell sampler and add the following code.
    The code does – with and puts inthe same variable as shown below

int count = Integer.parseInt(vars.get(“Values_matchNr”)); for(int
i=1;i<=count;i++) {

String value=vars.get(“Values_”+i); String value_replaced =
value.replaceAll(“-“, ” “); vars.put(“Values_”+i,value_replaced); }

enter image description here

You can use${Values_1}, ${Values_2} and so on..

enter image description here

assume that,If you want to pass it as a parameter to the next request you can just add that variable as shown below

enter image description here

you can see in the results t e s t q a , t e s t q b, t e s t q c passed as parameters
enter image description here

For more information on bean shell please follow this link

Source link https://sqa.stackexchange.com/questions/34364/i-need-to--all-the--values-between-the-two--symboli-e-t-e-s


Please enter your comment!
Please enter your name here