Apologize for such dummy question but this is my first time using curl command and now I got this command from somewhere to extract the following string
{"success":true,"results":1,"total":1,"more":false,"offset":0,"hits":[{"path":"/home/users/Vq7DPVRHzGVK--OTJsHs","excerpt":"","name":"Vq7DPVRHzGVK--OTJsHs","title":"Vq7DPVRHzGVK--OTJsHs","lastModified":"2017-03-03 16:45:46","created":"2017-03-03 16:45:46"}]}
I pipe the curl output to sed with the following script:
sed -e 's/^.*"path":"\([^"]*\)".*$/\1/
Result:
/home/users/Vq7DPVRHzGVK--OTJsHs
Can anyone explain how's the regex work here? and how do I get the result for only Vq7DPVRHzGVK--OTJsHs instead of including the /home/user path?