-2
Good afternoon, I have the following difficulty in JMETER:
"presignedUrlRequest": "https://fng-contratos-dev.s3.amazonaws.com/d29e66bc-0446-427a-b775-1e6337a91ac0?X-Amz-Security-Token=FQoGZXIvYXdzEBoaDLh4z888ggng%2B8QvCKEAncUSZst5G5HYDWQwd9OssIBIfnjIijL%2FXNo2BVv9UWYFaVeYzYFIH37185mx5t728"
I need to extract the entire link, but in three parts. 1 with only https. The second with fng-contracts-dev.S3.amazonaws.com. And the third from d29e66....
Could someone help?
Thank you!
Although it is possible to do with regex, I do not think it is the best way (regex is cool, but it is not always the best solution). My suggestion is that you use the class
java.net.URL
, that represents a URL (just what itsString
is): https://docs.oracle.com/javase/8/docs/api/java/net/URL.html– hkotsubo
Thank you so much for the return! I will check and understand. However, you would know about regex in this situation?
– Estevao FPM
I believe that a google search for "regex URL" should bring several options - and maybe right here on this site should have some related question (sorry, I did not search, but there should be pq is not a new subject and someone already asked). But these regex are usually so complicated that I find it simpler to use the class
URL
even :)– hkotsubo