Twitter Link Finder

Published by Ruud Peter Boelens in

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

  • The function is already written in the Tests tab, so you only need to provide the RegEx variable in the Code tab.
  • Only return the @ and # handles.

Examples

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

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

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

Notes

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

Watch a quick demo on how Edabit works.