This is a string
$string = "example.com/TARGET/noneed/noneed/noooo";
how to get TARGET using preg_match to start finding from first “/” till second “/” and ignore whatever follows
yup, its a bit nooby question, sorry but im not really good with regular expression
Use this regular expression:
This finds the first
/then matches the least possible until it finds the second/.See it working online: ideone