"s/(\(#[^\)]*\))/\<a href=\"?profiles\&do_view=1\&num_profile=\\1\"\>\(#\\1\)\<\/a\>/g"
You grouped the # sign with the number when you put \(#[^)]*\). Take the # out of the group and the expression should work.
use this regex:
s/(#\([^)]*\))/<a href=\"?profiles/\&do_view=1\&num_profile=\\1\">(#\\1)</a>/g
You have a lot of extrat back slants (\) in the string that I don't think are necessary. They probably don't hurt any thing but the do make the line hard to read. I dropped them out. If you need them to make the line work, put them back, but I would try the line without all the extra back slants first. The quotes (") you have around the expression should make most of them unnecessary.
-- not necessarily stoned... just beautiful.
[This message has been edited by hyperbole (edited 02-27-2004).]