Converts String::replace regex function to C
travisplexer: pr-143-osx travis ci test