Array (  => Array (  => http://www.example.com/images/image1.jpg  => http://www.example.com/images/image2.jpg  => http://www.example.com/images/image3.jpg  => http://example.com/images/image4.jpg )  => Array (  => www.example.com  => www.example.com  => www.example.com  => example.com )  => Array (  =>  =>  =>  => )  => Array (  => /images/image1.jpg  => /images/image2.jpg  => /images/image3.jpg  => /images/image4.jpg )  => Array (  => images/image1.jpg  => images/image2.jpg  => images/image3.jpg  => images/image4.jpg )  => Array (  =>  =>  =>  => ) )The problem is that this will be used for shortcodes… and lovely wordpress adds extra characters that we do not need…. that is why i was looking for regular expressions. If i only knew them…. but i find them wierd… lots of text that dose something…. never understood them.
looks weird but isn’t
- first array is an array all your urls (what you need)
- second array is an array with just the domains
- fourth array is an array with the paths
2st 3nd 5th4rd 6th https?://([-\w\.]+)+(:\d+)?(/([\w/_\.]*(\?\S+)?)?)?
the first array is the whole pattern
the third array should be the port
the 6th should be the query string
- Sold between 250 000 and 1 000 000 dollars
- Community Moderator
- Author was Featured
- Author has had an Item Featured
- Bought between 100 and 499 items
- Referred more than 2000 users
- Has been a member for 4-5 years
- Repeatedly Helped protect Envato Marketplaces against copyright violations
sevenspark said=)))) too simple to work but it did =)))) if anyone knows a regular than can do this it will be amazing, but in the time being this is very good. THANKS !!
Can’t you just use the
explode()function?$urls = explode("\n", $url_str);
No problem – glad it gets you going for the time being at least