-1

I am trying to parse the 'Meghan' part from the line:

link = http://python-data.dr-chuck.net/known_by_Meghan.html

...with the following regex:

print re.findall('by_(\S+).html$',link)

I am getting the output:

[u'Meghan']

Why I am getting the 'u'?

Alan Moore
  • 73,866
  • 12
  • 100
  • 156

1 Answers1

0

It means unicode. Depending on what you'll do with it, you can ignore it for the most part, of you can convert it to ascii by doing .encode('ascii')

yelsayed
  • 5,236
  • 3
  • 27
  • 38