Using [man]preg_match_all/man with a pattern like so:
$pattern = '@\<div class="style1"\>(.*?)\</div\>@i';
NOTE: This function assumes that the fields will never have a line break in them (the '.' doesn't match line breaks by default). If you want to allow line breaks as well, add an 's' after the last @ (before or after the 'i', doesn't matter).