-1

In my page response,I want to check how many times my word "good" is found. And criteria to find the word "good" in page is i.The left hand side is always preceded by a space.Ex- ‘ good’ ii.The right hand side can be followed by a space, a comma, or a period.Ex- ‘good.’ … ‘good ’ … ‘good,’

Let me know the Load runner function or if any customized function that i need to implement

Svp57
  • 308
  • 2
  • 13
  • do you mean this `(?<=\s)good|good(?=[, .])` see demo https://regex101.com/r/oY4aJ1/1 – james jelo4kul Oct 17 '15 at 12:27
  • @jamesjelo4kul Nope. I'm looking for the Load runner function to implement such pattern mattern matching.Usually web_reg_find is used as text check function.I want to know if there is any function that replaces this and helps to find the pattern matched using regular expression. – Svp57 Oct 17 '15 at 12:44

1 Answers1

0

You can use web_reg_save_param_ex with an "ORD=ALL" flag. You can then check the {paramname}_count for the number of instances with the pattern

James Pulley
  • 5,606
  • 1
  • 14
  • 14
  • Here my right boundary is varying(it could be space,comma etc), then how I could I go for web_reg_save_param_ex to do my work.Atleast I could rely on web_reg_save_param_regex. – Svp57 Oct 19 '15 at 09:12
  • Your left boundary is consistent. You could move your right boundary to any character which precedes the next instance of your left boundary consistently, such as '<' character. You are not as much interested in whether it is a period or space or a long string, but that the left boundary condition is satisfied and the left boundary condition is 'good' – James Pulley Oct 19 '15 at 13:44