if (preg_match(
'/(?<=\|\|) # Assert starting position directly after ||<
[^,|]*, # Match any number of characters except , or |; then a ,
[^,|]*, # twice (so we have matched at least two commas)
[^|]* # Then match anything except | characters
(?=\|\|) # until we are right before ||
/x',
$subject, $regs)) {
$result = $regs[0];
} else {
$result = "";
}
3
solved Need regular expression to search inside string [closed]