爲什麼下面的正則表達式:混淆正則表達式的結果
"_id":"(.+?)"}\],"componentType":"(.+?)"
該字符串:
"name":"in","_id":"a05d91a7-6be0-c252-08e9-bf94cc0be36e","value":"5.6"}],"_id":"e986915c-22db-429f-9fe7-ae2e2ddfa779","refId":"de9ff045-21ce-4833-af34-30f50c129840","failId":"8b723736-a391-fd7e-8d23-7cc72e568f48"},{"outputs":[{"metadata":{"label":{"value":"Output Integer","capco":"U"},"desc":{"value":"Output
Integer.","capco":"U"}},"name":"f7018f5c-057c-6ab9-7300-875c712b87b7","_id":"daad7ae7-356b-57ca-037e-0c4bcb307201"}],"componentType":"model","metadata":{"signature":"ab7e00a928dc79af806b828e1831a95e","zOrder":1,"label":{"lang":"en","value":"BBBBBBBBBBB","capco":"U"},"geom":{"w":150,"x":203,"h":60,"y":324}
底部從a05d91a7 UUID拉一切的組件類型,而不是來自於該_id底部?我有(據我所知)沒有任何指示在id(。+?)模式和componentType模式之間拉動額外的內容?
我試圖專門拉如下:
"_id":"daad7ae7-356b-57ca-037e-0c4bcb307201"}],"componentType":"model"
要明確,UUID是可變的,hense的
我想你需要一個像''_id「:」([^「] +?)」}],「componentType」:「([^」] +?)「';)的正則表達式。 –
出於好奇,爲什麼不使用一些json庫來解析輸入? – nu11p01n73R
不熟悉java的json庫中可用的東西,我在jmeter中構建這些查詢 –