Please help with a regular expression.
It is necessary to take with https://img.alicdn.com/bao/uploaded/i4/1739733928/TB2gHIymVXXXXaeXpXXXXXXXXXX_!!1739733928.jpg only the last digits ie _!!цифры.jpg
Please help with a regular expression.
It is necessary to take with https://img.alicdn.com/bao/uploaded/i4/1739733928/TB2gHIymVXXXXaeXpXXXXXXXXXX_!!1739733928.jpg only the last digits ie _!!цифры.jpg
$str = 'https://img.alicdn.com/bao/uploaded/i4/1739733928/TB2gHIymVXXXXaeXpXXXXXXXXXX_!!1739733928.jpg'; preg_match('/(\d+)\D*$/', $str, $matches); print_r($matches[1]); Result: 1739733928
Source: https://ru.stackoverflow.com/questions/513622/
All Articles