0

Anyone could tell me if it's possible in PHP to get the value "www.businessweek.com" from the following string:

[url=http://s.tt/11MXX]
[img]http://i.curate.us/img/a67f63e06f32291b79198e33de6f2d8f?offset=0&size=450&stamp=1294861758[/img]
[/url]Clipped from: [url=http://s.tt/11MXX]www.businessweek.com[/url]
([url=http://curate.us/11MXX+]share this clip[/url])

It's the curateus BB code version...I've made some testing and could also be without the "www".

Thanks in advance

1 Answer 1

3
preg_match_all('/\[url=.*?\](.*?)\[\/url\]/i', $data, $matches); 

Demo: http://rubular.com/r/82x6TeV9bM

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

1 Comment

Sorry: Warning: preg_match_all(): Delimiter must not be alphanumeric or backslash at ideone.com/kKxjM

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.