$re = '/\{\{[A-Za-z0-9_]+\}\}/';
$str = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<title> </title>
<style type="text/css">
body, td, p {font-family: Verdana, sans-serif;font-size:10pt;color:#000000;}
.highlight_orange{color:#ff6600;font-size:8pt;}
#perf_add_container{
width:100%;display:block;
}
#perf_add_container div {
line-height:12px;display:block;font-size:9pt;float:right;clear:right;width:100%;text-align:right;
}
.clearfix{
clear:both;width:100%;
}
.height_spacer_10px{
height:10px;
}
.height_spacer_20px{
height:20px;
}
.col1{
width:100%;
float:left;
}
.col2{
width:50%;
float:left;
}
.col3{
width:33%;
float:left;
}
.col4{
width:25%;
float:left;
}
.col_threequarter{
width:75%;
float:left;
}
.col6{
width:16%;
float:left;
}
.small_text{
font-size:7pt;
}
.underline_header_cell{
border-top: none; border-bottom: solid 2px black; border-left: none; border-right: none;
}
.coverCol1{
width:11%;display:block;float:left;
}
.coverCol2{
width:45%;display:block;float:left;
}
.coverCol3{
width:16%;display:block;float:left;
}
.coverCol4{
width:15%;display:block;float:left;
}
.coverCol5{
width:12%;display:block;float:left;
}
.footer_text{
bottom: 0;
width: 100%;
text-align:center;
font-size: 7pt;
font-weight:bold;
}
#statement_of_fact p{
font-size:7pt;
}
#page1{
width:100%;
float:left;
display:block;
}
.indentCol1{
width:70%;float:left;margin-left:15%;margin-right:15%;
}
.bottom_thick_border{
border-bottom:1px solid black;
}
</style>
</head>
<body lang="en-US" text="#000000" link="#0000ff" bgcolor="#ffffff" dir="ltr">
<!-- Page 1 Starts -->
<div id="page1">
<div class="indentCol1" style="text-align: center;">
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKQAAAB4CAMAAABLl6knAAABgFBMVEU2Vaf/2QC5xOD+8JwjRZ/NzhGZqdF0v1e0yBhwuy7+/v6vu9wAFocVOZjz9flYcrUAJI1zicFUsTHo5GRUsjkrSqGs2Z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E37pi44+y0BHuSRAZkZPEif9RuX+69oakFHnzqrwh3zqn1yfLx9+6mA+KXLw0IOslDch6SQOyXvI/LNoR+z0LhCsAAAAASUVORK5CYII=" name="Aviva" align="bottom" width="123" height="87" border="0"/>
</div>
<div class="clearfix height_spacer_20px"></div>
<div class="indentCol1" style="text-align: center;">
<h2>Certificate of Employers’ Liability Insurance<sub style="font-size:8pt;font-weight: normal;">(a)</sub></h2>
</div>
<div class="clearfix height_spacer_20px"></div>
<div class="indentCol1">
(Where required by regulation 5 of the Employers’ Liability (Compulsory Insurance) Regulations 1998, one or more copies of this certificate must be displayed at each place of business at which the Policyholder employs persons covered by the Policy)
</div>
<div class="clearfix height_spacer_20px"></div>
<div class="clearfix height_spacer_20px"></div>
<div class="indentCol1">
<div class="col1">Policy Number</div>
<div class="col1" style="text-align: center;"><h3>{{POLICY_NUMBER}}</h3></div>
<div class="col1 bottom_thick_border"> </div>
<div class="clearfix height_spacer_20px"></div>
<div class="col1">Name of Policyholder</div>
<div class="col1" style="text-align: center;"><h3>{{NAME_OF_INSURED}}</h3></div>
<div class="col1 bottom_thick_border"> </div>
<div class="clearfix height_spacer_20px"></div>
<div class="col2">Date of Commencement of Insurance</div>
<div class="col2">{{INSURED_PERIOD_FROM}}</div>
<!--<div class="indentCol1">Date of Commencement of Insurance</div>-->
<!--<div class="indentCol1"><h2>{{DATE_BEGINS}}</h2></div>-->
<div class="col1 bottom_thick_border"> </div>
<div class="clearfix height_spacer_20px"></div>
<!--<div class="indentCol1">Date of Expiry of Insurance</div>-->
<!--<div class="indentCol1"><h2>{{DATE_ENDS}}</h2></div>-->
<div class="col2">Date of Expiry of Insurance</div>
<div class="col2">{{INSURED_PERIOD_TO}}</div>
<div class="col1 bottom_thick_border"> </div>
</div>
<div class="clearfix height_spacer_20px"></div>
<div class="indentCol1">We hereby certify that subject to paragraph 2:</div>
<div class="clearfix height_spacer_20px"></div>
<div class="indentCol1">1. the policy to which this certificate relates satisfies the requirements of the relevant law applicable in Great Britain, Northern Ireland, the Isle of Man, the Island of Jersey, the Island of Guernsey and the Island of Alderney, or to offshore installations in territorial waters around Great Britain and its Continental Shelf (b)</div>
<div class="clearfix height_spacer_20px"></div>
<div class="indentCol1 bottom_thick_border">2. the minimum amount of cover provided by this Policy is no less than £5 million (c)</div>
<div class="clearfix height_spacer_20px"></div>
<div class="indentCol1 bottom_thick_border">
Signed on behalf of<br />
Aviva Insurance Limited<br />
(Authorised Insurers)<br />
<div style="padding:5px;padding-left:0px;">{{SIGNATURE}}</div>
Authorised Signatory<br />
Maurice Tulloch<br />
Chief executive officer, Aviva UK & Ireland General Insurance
</div>
<div class="clearfix height_spacer_20px"></div>
<div class="indentCol1 small_text">
Notes<br />
<ol style="list-style: lower-alpha;">
<li>Where the employer is a company to which regulation 3(2) of the Regulations applies, the certificate shall state in a prominent place, either that the policy covers the holding company and all its subsidiaries, or that the policy covers the holding company and all its subsidiaries except any specifically excluded by name, or that the policy covers the holding company and only the named subsidiaries.</li>
<li>Specify applicable law as provided for in regulation 4(6) of the Regulations.</li>
<li>See regulation 3(1) of the Regulations and delete whichever of paragraphs 2(a) or 2(b) does not apply. Where 2(b) is applicable, specify the amount of cover provided by the relevant policy.</li>
</ol>
</div>
<div class="clearfix height_spacer_20px"></div>
<div class="indentCol1" style="text-align: center;"><h5>It is advised that you retain a copy of each Employers’ Liability certificate issued to you</h5></div>
<div class="clearfix height_spacer_20px"></div>
<div class="footer_text indentCol1">
This policy is underwritten by Aviva Insurance Limited.<br />
Registered in Scotland, No. 2116. Registered Office: Pitheavlis, Perth PH2 0NH<br />
Authorised by the Prudential Regulation Authority and regulated by the Financial Conduct Authority and the Prudential Regulation Authority.
</div>
<div class="clearfix height_spacer_20px"></div>
<pagebreak />
</div>
<!-- Page 1 Ends -->
</body>
</html>';
preg_match_all($re, $str, $matches, PREG_SET_ORDER, 0);
// Print the entire match result
var_dump($matches);
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for PHP, please visit: http://php.net/manual/en/ref.pcre.php