regex modified to support both html and markdown images