0

I have to create a test application on JMeter where i need to get only that anchor tag and all its content which has my url name.

&lta href='http://www.mysite.com/' title='Free Stuff' target='_NEW'>Free Stuff&lt/a>

or any other variant is returned. Only prerequisite is that it should start with < a , have mysite.com in between and < / a > at the end. I have endlessly tried to do this, even searched this forum but to no avail. Help needed desperately.

Thanks

Suyash
  • 625
  • 1
  • 5
  • 22

1 Answers1

2

You can take the parts you require and fill the remainder of the pattern with "give me anything".

<a[^>]*mysite\.com.+?<\/a>

demo

Brigand
  • 84,529
  • 20
  • 165
  • 173
  • This actually does not stop at the first occurrence of a> but goes on till it finds a> – Suyash Mar 22 '12 at 22:40
  • Thanks. I just threw a `?` in there, which should fix it. In most implementations, that would only matter if they were on the same line, but good catch. – Brigand Mar 22 '12 at 23:52