Need help with StresStimulus? Start here.
Extract a group from regular expression extractor
Unregistered User Posts: 514
5/28/2023
|
Is there an option for providing group number to extract. What if I wanted to capture second value and not first.
|
|
0
link
|
George @StresStimulus Administrator Posts: 568
5/28/2023
|
StresStimulus regular expression extractors always return the first capture group. In order to return the second group you can change first group to a non-capture group by adding ?: to the beginning of the group definition. For example, for following regular expression: "Id"\:"([0-9]{4,})","Name":"(.*?)" To extract the Name change the regular expression to "Id"\:"(?:[0-9]{4,})","Name":"(.*?)"
|
|
0
link
|
Copyright © 2025 Stimulus Technology