0

I have a problem here. The line in response goes something like this:

*14*PerfTest1 PerfTest2*14*Individual

Here I want to extract out PerfTest2 for a LastName value.

But the first name also would differ for some test data. *14*Individual would be the same for all the responses. Need help in extracting PerfTest2 from similar lines like above.

Sergio
  • 3,317
  • 5
  • 32
  • 51
  • If I get you right, you could do it with `\w+(?=\*14\*Individual)`. [Check this example](https://regex101.com/r/tR5wJ9/1). But some more input/output examples wouldn't hurt. – SamWhan Jun 03 '16 at 07:25
  • Thanks for the help. But the same does not work in RPT Reference Element. It says Unclosed Group near Index – Sai Subramanian Jun 03 '16 at 07:37
  • Did you copy right after I entered comment? Because I missed the closing `)` and edited 20 seconds later... – SamWhan Jun 03 '16 at 07:47
  • Do you know anything about regex flavor? Because I've been googling to find info on RPT regex, but can hardly find anything... – SamWhan Jun 03 '16 at 07:49
  • I am also trying hard to find the actual regex. None of the above works. '\w(.+?)\*14\*Individual' should also work. But sadly it doesn't – Sai Subramanian Jun 03 '16 at 08:02
  • The how about \*14\*\w+\s+(.*)\*14\*Individual ? It will put the name in the first capture group, But since it doesn't use lookahead nor lookbehind it matches the whole string. – LukStorms Jun 03 '16 at 08:16

0 Answers0