Regular expressions

<link rel="stylesheet" type="text/css" href="erroe.css" />
<script src="/assets/application-594a8b024032fedaa5d3c4c61a1b3d17.js" type="text/javascript"></script>
How regular extraction href SRC value

Started by Augustine at December 13, 2016 - 8:21 AM

IndexOf ('href= ").
For example, ur= "you string data"

c=ur.indexOf('href="')
c2=ur.idnexOf('"',c+7)
a=ur.substring(c+6,c2)

A is your URL address
This is the JavaScript code

Posted by Anita at December 25, 2016 - 8:25 AM

window.onload=function(){
var l=document.getElementsByTagName('link');
for(var i=0,len=l.length;i++){
alert(l[i].getAttribute('href'))
}
}
Href is the same.

Posted by Maurice at January 08, 2017 - 8:59 AM