PHP PCRE expression problem - get digits of a string

Posted by yoda on Stack Overflow See other posts from Stack Overflow or by yoda
Published on 2010-05-27T21:12:42Z Indexed on 2010/05/27 21:21 UTC
Read the original article Hit count: 413

Filed under:
|
|

Hi,

I need a regex expression (PCRE) to match a integer number inside a string, being the string like : image89.jpg

I've tried many options without success.

I'm using preg_replace() by the way

My last attempt :

preg_replace('(\d+)', '$1', 'image89.jpg');

© Stack Overflow or respective owner

Related posts about php

Related posts about regex