I\'ve been trying to output
as \'\\U0001f604\' instead of the smiley but it doesn\'t seem to work.
i tried
This code might help you to see how you can simply print an emoji:
# -*- coding: UTF-8 -*-
import re
# string = 'Anything else that you wish to match, except URLs http://url.org'
string = 'Anything else that you wish to match'
matches = re.search(r'^(((?!http|https).)+)$', string)
if matches:
print(matches.group(1)+ " is a match