Post archive for ‘Random’
JavaScript: String.replace()
Today I had to help out my friend with replace any email address with < email address >
Here is the easiest solution I could come up with:
var myString = “My email address rajesh.segu@abc.com”;
function replaceEMail(){
return “<”+arguments[0]+”>”;
}
myString = myString.replace( /([0-9a-zA-Z]+[-._+&])*[0-9a-zA-Z]+@([-0-9a-zA-Z]+[.])+[a-zA-Z]{2,6}([\w/_\.]*(\?\S+)?)/ig, replaceEMail);
myString here becomes “My email address <rajesh.segu@abc.com>”.
The best part in this solution is that you could pass [...]
Wedding Invitation ( Vijetha G weds Rajesh Segu )
It is our moment to celebrate the love that unites us.
Together with our parents, we
Vijetha G
and
Rajesh Segu
invite you to share with us
this joyous celebration of love
at our marriage.
PS: Palamaner is 2 hrs away from Bengaluru while Achampet is 2hrs away from Hyderabad.
JavaScript: String.replace
Today I had to help out my friend with replace any email address with < email address >
Here is the easiest solution I could come up with:
var myString = “My email address rajesh.segu@abc.com”;
function replaceEMail(){
return “<”+arguments[0]+”>”;
}
myString = myString.replace( /([0-9a-zA-Z]+[-._+&])*[0-9a-zA-Z]+@([-0-9a-zA-Z]+[.])+[a-zA-Z]{2,6}([\w/_\.]*(\?\S+)?)/ig, replaceEMail);
myString here becomes “My email address <rajesh.segu@abc.com>”.
The best part in this solution is that you could [...]
My Workspace @ Yahoo, Pune
My Work Space @ Yahoo & My new Mac Book Pro
Upper Deck @ Lonavala
Omni Nature, Rejuvalating Climate, Amidst Clouds, Pouring Rains, Swimming Pool, Dance Floor, Fun Filled Activities, Great Friends, Chit Chatting, Humor, Silly Stories and Great Memories @ UpperDeck, Lonavala.
We had been there recently as a part of team building efforts by Yahoo!!