BaşlayınÜcretsiz başlayın

Find the numbers

While examining the tweet text in your dataset, you detect that some tweets carry more information. The text contains the number of retweets, user mentions, and likes. You decide to extract this important information that is given as in this example:

Agh,snow! User_mentions:9, likes: 5, number of retweets: 4

You pull a list of metacharacters:\d digit,\w word character,\s whitespace.

Always indicate whitespace with metacharacters.

The variable sentiment_analysis containing the text of one tweet and the re module were loaded in your session. You can use print() to view it in the IPython Shell.

Bu egzersiz, kursun bir parçasıdır

Regular Expressions in Python

Kursa Göz Atın

Uygulamalı etkileşimli egzersiz

Bu egzersizi bu örnek kodu tamamlayarak deneyin.

# Write a regex to obtain user mentions
print(re.____(____"____", ____))
Kodu Düzenle ve Çalıştır