如何创建正则表达式以从字符串响应中提取值?

时间:2019-05-30 07:57:23

标签: jmeter

如何找到正则表达式以从以下响应中提取值标签?

<CustomFieldList>
    <CustomField>
        <Name>OFFER_META_DATA</Name>
        <Value>
            SE7gOMOEOfvKjka8b+8k4SqccKEAB8ZjUqDl0Mv7OZeKEITd0l2rAFAL1XAxgzE8+lLt6XaR9IYDY0MmUaRfGXkiE/SOmYzMB+DccN2V1cOfsBav1BNaUsubTKW79qtXwwNcg4saeZZSqaiAVDJIFFUZq+u0UhqE6aZ2EbdwELyHZPP9HfHSRHCV9ihjlHvGHKRYdL2j4PvE5O5eg3ajmSTmI5aRAG42+epkCroTRDglUmCnHMTlA3VvSvtBV/fq9lI54JqqkSDj+83tKhclvZWPw08zu6drpp6PeZwmG1UwlmokLAwI0QCxYjnJEYwt7Ikt1sm8JqWzUPoVGHJoyw==%~~`%~~~~~~~%^**(%$#%ZWZby8uQ7CCjcQDbU7exlCDAXUeQ47bkD2kcxkobEQ9y1IBlPDpk7JEquCdxOnkKCRi9y8AswLegW98YyC+OAUoMCvN5XWYMJOmGK2gkj+5xzUbGZy9GS7ov4DQ+rPaHqvomADIKxXNw52ZSda/cwvfcUETGxi6yDcEgdIXj4abWQTNUGoSE34oHPNZ0CamHd1ZCZr36DqrIRXO595aTTAQX2E/ZUvoXnxT79ezoCOkt/xGOAEGKUjCUYYGnOAmHARf5t4aqK9Z+JhB8wVtT9KaD7xunGePjINmQrEYDeosEGrFyQ0OQWfwDyjQmA+GFbFRoabZgg3tkjCNCWEXI6Q==
        </Value>
    </CustomField>
</CustomFieldList>

2 个答案:

答案 0 :(得分:0)

使用CSS选择器,如下所示:- enter image description here enter image description here

希望这会有所帮助。

答案 1 :(得分:0)

您必须使用多选正则表达式。请在您的情况下找到所需的表达方式

(?ms)<Value>(.*?)</Value>