maqskywalker
asked on
regular expression format with jquery replace function to replace a string prior to an @ symbol
I'm using html, css and jquery.
I saw the regex example at this link
http://stackoverflow.com/questions/1329329/using-jquery-and-regular-expressions-to-change-part-of-href
So then I created this fiddle: https://jsfiddle.net/3wy1zvdc/
In this fiddle in my hyperlink, I replace the value of the href attribute from google.com to bing.com using regular expression.
This works just fine.
So now I'm creating another example with a hyperlink tag that looks like this:
<a id="Link1" class="Link1Class" href="http://www.google.com@item.LastName" >Davolio</a>
Using regular expression like I did in my fiddle above how would I replace everything before the @ symbol in my href tag with the value aol.com
So then on page load my hyperlink tag would contain this:
<a id="Link1" class="Link1Class" href="http://www.aol.com@item.LastName" >Davolio</a>
Anyone know the regular expression format for this?
I saw the regex example at this link
http://stackoverflow.com/questions/1329329/using-jquery-and-regular-expressions-to-change-part-of-href
So then I created this fiddle: https://jsfiddle.net/3wy1zvdc/
In this fiddle in my hyperlink, I replace the value of the href attribute from google.com to bing.com using regular expression.
This works just fine.
So now I'm creating another example with a hyperlink tag that looks like this:
<a id="Link1" class="Link1Class" href="http://www.google.com@item.LastName" >Davolio</a>
Using regular expression like I did in my fiddle above how would I replace everything before the @ symbol in my href tag with the value aol.com
So then on page load my hyperlink tag would contain this:
<a id="Link1" class="Link1Class" href="http://www.aol.com@item.LastName" >Davolio</a>
Anyone know the regular expression format for this?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You're welcome.
Thanx 4 axxepting
Thanx 4 axxepting
ASKER