Nevermind. This works:
ereg("Q+[0-9]{6}",$Data[$n],$qarticle); $GetLine = explode("\r", ereg_replace("Q+[0-9]{6}","<a href=\"http://support.microsoft.com/default.aspx?scid=kb;[LN];$qarticle[0]\" target=\"blank\">$qarticle[0]</a>",$Data[$n])); "Mike Smith" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I'm trying to return a pattern found in a regular expression. I can find the > Expression (Q followed by 6 numbers, yes MS Q articles) using this: > > $GetLine = explode("\r", ereg_replace("Q+[0-9]{6}","<a > href=\"http://support.microsoft.com/default.aspx?scid=kb;[LN];Q+[0-9]{6}\" > target=\"blank\">'Q+[0-9]{6}'</a>",$Data[$n])); > > I'm basically trying to find the pattern and 'replace' it with itself as a > clickable link to MS's Q articles so I need to insert "Q+[0-9]{6}" after > [LN]; in the href and then again as the text of the link. The script runs > but produces: > > http://support.microsoft.com/default.aspx?scid=kb;[LN];Q+[0-9]{6} and echos > Q+[0-9]{6} as the clickable link. > > Thanks, > Mike Smith > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php