Hi,
Can you help me with that.
I'm tried few times, but failed.
I want to extract numbers from the name of file.
File name':P-65002-xh0dICiqQS-1.jpg
How to get these numbers between P- and - ?
I tried like that:
But I'm sure that part: preg_match("P-(.*)-" has to be changed.
I don't know parrameter that should go there.
Can anyone help me with that?
Thank You very much.
Can you help me with that.
I'm tried few times, but failed.
I want to extract numbers from the name of file.
File name':P-65002-xh0dICiqQS-1.jpg
How to get these numbers between P- and - ?
I tried like that:
PHP Code:
<?php
$text = 'P-65002-xh0dICiqQS-1.jpg';
preg_match("P-(.*)-", $text, $matches);
$value = $matches[1];
echo"$value";
?>
I don't know parrameter that should go there.
Can anyone help me with that?
Thank You very much.
Comment