← Back to challenges

Twitter Link Finder

PythonHardregexformatting

Instructions

Your job is to make a "Twitter link" regular expression rx. This RegEx searches a tweet to find the @handle and the #handle. Only return the @ and # handles.

Examples

tweet("Visit us at @innokodakademija") ➞ "@innokodakademija"

tweet("Follow @JavaScript") ➞ "@JavaScript"

tweet("#Honesty is the best @policy!!") ➞ "#Honesty @policy"

Notes

Make sure the RegEx doesn't return . , ! ?, etc.

python3
Loading editor…
to run
Walks through the solution with reasoning and edge cases.