I'm writing an importer for PHPbb to Discourse, using Ruby.
All over the PHPbb database are strings like
<!-- s:( --><img src="{SMILIES_PATH}/rice_frown.png" alt=":(" title="Frown" /><!-- s:( -->
<!-- s:'( --><img src="{SMILIES_PATH}/rice_crying.png" alt=":'(" title="Crying" /><!-- s:'( -->
I need to replace the string with the symbols in the alt attribute, so for the above I need :(
and :'(
. I'm substituting other things with regexes but I can't get the right pattern for this.