I am using Jquery.
I have got below links in my html
<a class="load-fragment" href="/english/india/index.aspx"><span>Overview</span></a>
<a class="load-fragment" href="/english/india/guide.aspx"><span>Guide</span></a>
I am trying to get out “index” and “guide” from (href=”/english/india/index.aspx”, href=”/english/india/guide.aspx”) text from above links and they will be stored in a variable for further use, there will be looping as there can be many links as given above.
Please suggest using Jquery!
Thanks!
You could use a regex like this:
You can test it out here, or if say you wanted an array of them use
.map():