All pastes #805505 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-12-04 12:50 UTC
rendered paste body
Previous source:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<title>stoxpoker.com | Translations</title>
		<link rel="stylesheet" type="text/css" href="style.css" media="screen" />
	</head>
	
	<body>
<pre><SAMI>

<HEAD>
   <STYLE TYPE="Text/css">
   <!--
      P {margin-left: 29pt; margin-right: 29pt; font-size: 24pt; text-align: center; font-family: Tahoma; font-weight: bold; color: #FFFFFF; background-color: #000000;}
      .SUBTTL {Name: 'Subtitles'; Lang: en-US; SAMIType: CC;}
   -->
   </STYLE>
</HEAD>
<BODY>
   <SYNC START=6000><P CLASS=SUBTTL>Hi everyone. This is leatherass for Stoxpoker.com
</P></SYNC>
   <SYNC START=11000><P CLASS=SUBTTL>&nbsp;
</P></SYNC>
   <SYNC START=11001><P CLASS=SUBTTL>Playing 2 tables of $400 buy-in, no limit, 6 max
</P></SYNC>
   <SYNC START=16001><P CLASS=SUBTTL>&nbsp;

</P></SYNC>
   <SYNC START=38002><P CLASS=SUBTTL>Have played a lot with Reynolds. He can be an aggressive, tricky opponent at times
</P></SYNC>
   <SYNC START=44002><P CLASS=SUBTTL>&nbsp;
</P></SYNC>
   <SYNC START=48003><P CLASS=SUBTTL>It's nice to have a read. Nice to have direct position on him on the left table
</P></SYNC>
   <SYNC START=54003><P CLASS=SUBTTL>&nbsp;
</P></SYNC>



Code:

$buf = preg_split("/SYNC START=(.*)>(\s*)<P CLASS=(.*)>(.*)<\/P><\/SYNC>/", $mystr);

echo "<pre>";
print_r($buf);
echo "</pre>";
die();


results in:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<title>stoxpoker.com | Translations</title>
		<link rel="stylesheet" type="text/css" href="style.css" media="screen" />
	</head>
	
	<body>
<pre>Array
(
    [0] => <SAMI>

<HEAD>
   <STYLE TYPE="Text/css">
   <!--
      P {margin-left: 29pt; margin-right: 29pt; font-size: 24pt; text-align: center; font-family: Tahoma; font-weight: bold; color: #FFFFFF; background-color: #000000;}
      .SUBTTL {Name: 'Subtitles'; Lang: en-US; SAMIType: CC;}
   -->
   </STYLE>
</HEAD>
<BODY>
   
    [1] => 
   
    [2] => 
   
    [3] => 
   
    [4] => 
   
    [5] => 
   
    [6] => 
   
    [7] => 
   
    [8] => 
   
    [9] => 
   
    [10] => 
   
    [11] => 
   
    [12] => 
   
    [13] => 
   
    [14] => 
   
    [15] => 
   
    [16] => 
   
    [17] => 
   
    [18] => 
   
    [19] => 
   
    [20] => 
   
    [21] => 
   
    [22] => 
   
    [23] => 
   
    [24] => 
   
    [25] => 
   
    [26] => 

etc..

    [564] => 
   
    [565] => 
   
    [566] => 
</BODY>
</SAMI>
)
</pre>	</body>
</html>