What's the regex to solve this problem?
- by Yeti
I have an array in PHP with URLs like below:
http://example.com/apps/1235554/
http://example.com/apps/apple/
http://example.com/apps/126734
http://example.com/images/a.jpg
http://example.com/images/b.jpg
http://example.com/apps/2331234/
http://example.com/apps/orange/
How can I separate out these urls and push them to another array using Regex:
http://example.com/apps/1235554/
http://example.com/apps/126734
http://example.com/apps/2331234/
Only url with apps/{number}/ and apps/{number} should be selected.