0

I need a regex match that can match to file paths. Basically I am trying to match something which has "/" in the string and ends with "."something.

Ex: test/helpers/home/file_name.php

Can I get some help?

0

1 Answer 1

2

You could either use sth. like (see the demo on regex101.com)

(?=[^/]*/).+\.php

Or glob(), see the documentation on php.net.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.