I have a string that looks like:
"res":"https://my.site.com/image/I/fj23l6j2lgk_AM1200_.jpg"
My bash regex is (if we let the above equal to $str):
echo $str | grep -oE "\"res\":\"https://my.site.com/image/I/[[:alnum:]]{11}._[a-zA-Z0-9_]*_.jpg\"" \
| grep -oE "my.site.com/image/I/[[:alnum:]]{11}._[a-zA-Z0-9_]*_.jpg" | head -1
which cleanly extracts out https://my.site.com/image/I/fj23l6j2lgk_AM1200_.jpg.
In PHP, I am unsure if an equivalent can exist to what I have above. Does anyone have any suggestions?