.
I want to extract the ID attribute from an HTML file by using Notepad++ or Dreamweaver. Delete all other texts.
For Eg:
<div id="header" class="header-blue sticky">
<div id="header-message" class="alert alert-dismissible">
<form id="contact-form" class="custom-form" method="POST" action="https://www.google.com">
<input id="your-email" type="email" class="form-email" placeholder="Your Email">
I want to extract only ID attribute from HTML like this;
id="header"
id="header-message"
id="contact-form"
id="your-email"
So what I can do? Please help me..
.
<\w+[^>]+(id=".+?").*?>
$1
Explanation:
<\w+ # opening tag
[^>]+ # 1 or more not >
(id=".+?") # group 1, id and value
.*? # 1 or more any character, not greedy
> # close tag
Screenshot (before):
Screenshot (after):