Regular expression to link twitter users…
Replace this '@(\w+)'
With this '<a href="http://twitter.com/\1">@\1</a>'
Byte sized tech know-how.
Regular expression to link twitter users…
Replace this '@(\w+)'
With this '<a href="http://twitter.com/\1">@\1</a>'
Copyright © 2024 Txt
Binny, I didnt understand a word of that 🙁
I am interested because its related to twitter, can you give some insight for this no-bie.. ?
Tell me what it is supposed to do, one application of this code..
Say you write a post about twitter meetup – and put in a lot of twitter handles like @binnyva and @arunbasilllal. Then you decide that you need to link the usernames to their twitter profile. Either you could go and edit all the handles manually, or you could do a regular expression replace.
It basically replaces a specific string pattern with another pattern. I hope I have made it clear for you. And please curse your college for not teaching your useful stuff like this(this topic was covered in BCK5 in my talk).
My college never teach me anything I need to know, but gave me some awesome friends and a chance to meet a lot of people. Helps in character formation 😀
Now got a better picture, but it would be ages when I would be using it somewhere. Hey, cant say actually, life changes in no time… 🙂