I'm trying to select specific lines in an html document using regex.
I'm looking to select lines starting with <link
and that do NOT contain in the href
the characters ../
Here's part of the html I have
<script type="text/javascript" src="/js/IP_Master_PT_RTL.master.js"></script>
<link rel="stylesheet" type="text/css" href="../global.design-editor.com/v8/main.min1024.css?v=_STAGING-Publisher_20180327.1" />
<link rel="stylesheet" type="text/css" href="../fonts.googleapis.com/earlyaccess/alefhebrew.css" />
<link rel="stylesheet" type="text/css" href="ad-systems368c.css?v=4701716615" />
This is what i did so far:
<link[^\*]*?href=[^\*]*?"[^..]*
I'm getting close but i would like to select the whole tag and not have the other tags selected.
I just started learning about regex so i'm fairly new to this.