then replace it with regex '<markup>\\1</markup>'","re.sub('\\b(this|string)\\b', '<markup>\\1</markup>', 'this is my string')"