How to extract only part of string in PHP?
Posted
by shin
on Stack Overflow
See other posts from Stack Overflow
or by shin
Published on 2010-03-27T16:06:17Z
Indexed on
2010/03/27
16:13 UTC
Read the original article
Hit count: 304
I have a following string and I want to extract image123.jpg.
..here_can_be_any_length "and_here_any_length/image123.jpg" and_here_also_any_length
image123 can be any length (newimage123456 etc) and with extension of jpg, jpeg, gif or png.
I assume I need to use preg_match, but I am not really sure how to code it.
Any help will be appreciated.
Thanks in advance.
© Stack Overflow or respective owner