Intermediate RegEx expression:

Hey guys,

I’ve been using PHP for a while, but i’m fairly new to RegEx, so I was wondering if anyone could help me solve this dilemna using RegEx:

How do I search a string for data enclosed within ## symbols, and if there is any, then remove the **##**s from around the text, and convert the text to its ASCII equivalent?

For example, the before:

$str = "##Hi##, this is a ##test## string.";

And, the after (ignore the dots):

$str = "&.#72;&.#105;, this is a &.#116;&.#101;&.#115;&.#116; string.";

Thanks in advance! :kommie:
Matt