Jump to content

Find a pattern


unknown1

Recommended Posts

How would I go about finding this pattern?

 

 some random text http://www.somesite.com/en/bluhbluhbluh/?partner=compare&cy=EN woot 8.99

 

i tried [A-Za-z][\n]{0,}[http\://[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}(/\S*)?]{0,}[\n]{0,}[A-Za-z0-9\.]

only this part http\://[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}(/\S*)?]{0,}[\n]{0,}[A-Za-z0-9\. is working to find the url but can't get everything else

seems like anything i put before or after http\://[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}(/\S*)? does nothing.

 

 

Need to get "some random text" and "woot 8.99" in addition to the url

Link to comment
https://forums.phpfreaks.com/topic/285475-find-a-pattern/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.