php regular expression help finding multiple filenames only not full URL
Posted
by jason
on Stack Overflow
See other posts from Stack Overflow
or by jason
Published on 2010-04-06T03:21:47Z
Indexed on
2010/04/06
3:23 UTC
Read the original article
Hit count: 346
php
|expressions
I am trying to fix a regular expression i have been using in php it finds all find filenames within a sentence / paragraph. The file names always look like this:
/this-a-valid-page.php
From help i have received on SOF my old pattern was modified to this which avoids full urls which is the issue i was having, but this pattern only finds one occurance at the begging of a string, nothing inside the string.
/^\/(.*?).php/
I have a live example here: http://vzio.com/upload/reg_pattern.php
© Stack Overflow or respective owner