I am trying to use the preg_match_all to match something like this..
SomeWords:<a href="www.url.com/somewhere/somefile.html">SomeWords</a>(SomeWords), <a href="www.url.com/somewhere/somefile.html">SomeWords</a>, <a href="www.url.com/somewhere/somefile.html">SomeWords</a>(SomeWords).
The pattern is like the example above, it first start with some words and then a colon, then, a URL, then (some words)
(some words) may or may not appear, and <a href="www.url.com/somewhere/somefile.html">SomeWords</a>(SomeWords) will repeat and separate by a comma. The end of line have a period.
I got something like this
preg_match_all("/(.?)(<a href=\"(http:\/\/.?)\">(.?)<\/a>)(\w?)./i", $myStr, $arrayoflinks3);
but it doesn't quite work. Anyone know how to match this?