Location: PHPKode > scripts > preg_magic > preg_magic/example/fields_example.php
<?php
$HistoryFields = array(
	'cardnumber'    => 'card number:<\/span>\s*((?:\d{4}\s*){3}\d{4})',
	'balance'       => 'Card balance:<\/td>\s*<td>\s*(\$\d+\.\d+)',
	'history'       => array(
		'@table'        => true,
		'@table_start'  => 'class="results_table">.+?<\/tr>\s*',
		'@table_end'    => '\s*<\/table>',
		'@table_fields' => array(
			'stamp'        => '\s*<tr class="(?:odd|even)">\s*'
			                  . '<td>(\d+-\w+-\d+\s*\d+:\d+\s*\w+)<\/td>',
			'type'         => '<td.*?>\s*([^<]*?)\s*<\/td>',
			'location'     => '<td.*?>\s*([^<]*?)\s*<\/td>',
			'amount'       => '<td.*?>\s*([^<]*?)\s*<\/td>',
			'gst'          => '<td.*?>\s*([^<]*?)\s*<\/td>\s*<\/tr>\s*'
		)
	)
);
Return current item: preg_magic