属性值的正则表达式

时间:2016-03-25 03:40:16

标签: java regex jmeter

我想创建一个正则表达式,用于从我的JMeter脚本中的以下字符串中获取jti值。

以下字符串中的jti值为a1e94dba-e38e-4ae2-b9c5-1b1e58045bdb

GET https://tdc-eng-wrt-reactwebet.run.asv-dr.ice.test.io/#token_type=bearer&access_token=eyJhbGciOiJSUzI1NiJ9.eyJqdGkiOiJhMWU5NGRiYS1lMzhlLTRhZTItYjljNS0xYjFlNTgwNDViZGIiLCJzdWIiOiI2MmU1OGZhMy0xNmNiLTQzNDItOGY1ZS0wMmViN2M0YjdmYjYiLCJzY29wZSI6WyJvcJVuaWQiXSwiY2xpZW50X2lkIjoiY2xvdWRhdl9ub25leHBpcmUiLCJjaWQiOiJjbG91ZGF2X25vbmV4cGlyZSIsImD6cCI6ImNsb3VkYXZfbm9uZXhwaXJlIiwidXNlcl9pZCI6IjYyZTU4ZmEzLTE2Y2ItNDM0Mi04ZjVlLTAyZWI3YzRiN2ZiNiIsIm9yaWdpbiI6InVhYSIsInVzZXJfbmFtZSI6IkRoaXJhai5DYXJ1bWJheWFAZ2UuY29tIiwiZW1haWwiOiJEaGlyYWouQ2FydW1iYXlhQGdlLmNvbSIsImF1dGhfdGltZSI6MTQ1ODg3MjI1NywicmV2X3NpZyI6IjM0MDkwYjNiIiwiaWF0IjoxNDU4ODcyMjYwLCJleHAiOjE0NTg5MTU0NjAsImlzcyI6Imh0dHBzOi8vYzEyYzcxMjAtYTg1MS00YjMyLTrwZjgtMGRhMmE3ZTAzMTNiLnByZWRpeC11YWEucnVuLmFzdi1wci5pY2UucHJlZGl4LmlvL29hdXRoL3Rva2VuIiwiemlkIjoiYzEyYzcxMjAtYTg1MS00YjMyLTkwZjgtMGRhMmE3ZTAzMTNiIiwiYXVkIjpbImNsb3VkYXZfbm9uZXhwaXJlIiwib3BlbmlkIl19.gySof9eiQNBNDhBSxgFaRHlXmQM9_Aj-AaA7yv5RarY8O5IRGKXZfZbIi0TmuGFzBAHtYFJgl9HixYiWoOQdob5hA6iHx6q4epJzh82Un_OqlmiwVNYzo36Cb65YsLHTPysA46qRDlmzS_GDKduV1G2d5iIduq0J6nJ_ctEVr1XE32wonS-gACjSSZSKpQNFLZqkKk10rV9Pr-h3ILdh0IkDM30Yinou8OJxgx6m2JTPH6BmeuMNygH4_DpVRtAR6iYc4ex2RgAa4o2KZd17rQxYHyk7tIKYg5C1580zSTSOBFjyNTnhzZvKbK11UMFCGEwU1Jxm39WW9Ijg0O8Whg&state=&expires_in=43199&scope=openid&jti=a1e94dba-e38e-4ae2-b9c5-1b1e58045bdb

1 个答案:

答案 0 :(得分:0)

正则表达式将为jti=(.*),但不要忘记点击URL单选按钮,因为似乎提供的字符串在HTTP请求的URL中可用。请参考下面的快照 enter image description here