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

Closed due to the fact that off-topic participants cheops , Visman , Alexey Shimansky , aleksandr barakin , Nick Volynkin 18 Apr '16 at 9:03 .

  • Most likely, this question does not correspond to the subject of Stack Overflow in Russian, according to the rules described in the certificate .
If the question can be reformulated according to the rules set out in the certificate , edit it .

    1 answer 1

     $str = 'https://img.alicdn.com/bao/uploaded/i4/1739733928/TB2gHIymVXXXXaeXpXXXXXXXXXX_!!1739733928.jpg'; preg_match('/(\d+)\D*$/', $str, $matches); print_r($matches[1]); 

    Result: 1739733928

    • Thanks for the code =) - mega94
    • 3
      Please do not do tasks entirely for other people. So you teach them to be lazy and encourage them to continue to come and demand ready-made solutions. - Nick Volynkin
    • 7
      A person does not know how to create a regular expression for a specific task, should I advertise books for him? - Invision
    • 3
      @Invision the problem is that the person still does not know how to create a regular expression for a specific task. - Nick Volynkin