# feedwordpress/2011.0512/feedwordpresshtml.class.php

FeedWordPress, version 2011.0512. 87 lines.

- Page: https://pluginprobe.com/plugins/feedwordpress/2011.0512/code/feedwordpresshtml.class.php
- Raw: https://pluginprobe.com/plugins/feedwordpress/2011.0512/raw/feedwordpresshtml.class.php
- Modified: 2010-06-30T18:30:14+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/feedwordpress/2011.0512/code/feedwordpresshtml.class.php#L10-L20`.

```php
<?php 
class FeedWordPressHTML {
	function attributeRegex ($tag, $attr) {
		return ":(
		(<($tag)\s+[^>]*)
		($attr)=
		)
		(
			\s*(\"|')
			(((?!\\6).)*)
			\\6([^>]*>)
		|
			\s*(((?!/>)[^\s>])*)
			([^>]*>)
		)
		:ix";
	} /* function FeedWordPressHTML::attributeRegex () */

	function attributeMatch ($matches) {
		for ($i = 0; $i <= 12; $i++) :
			if (!isset($matches[$i])) :
				$matches[$i] = '';
			endif;
		endfor;

		$suffix = $matches[12].$matches[9];
		$value = $matches[10].$matches[7];

		return array(
		"tag" => $matches[3],
		"attribute" => $matches[4],
		"value" => $value,
		"quote" => $matches[6],
		"prefix" => $matches[1].$matches[6],
		"suffix" => $matches[6].$suffix,
		"before_attribute" => $matches[2],
		"after_attribute" => $suffix,
		);
	} /* function FeedWordPressHTML::attributeMatch () */

	function tagWithAttributeRegex ($tag, $attr, $value) {
		return ":(
		(<($tag)\s+[^>]*)
		($attr)=
		)
		(
			\s*(\"|')
			((((?!\\6).)*\s)*($value)(\s((?!\\6).)*)*)
			\\6([^>]*>)
		|
			\s*((?!/>)($value))
			([^>]*>)
		)
		(((?!</($tag)>).)*)
		(</($tag)>)
		:ix";
	} /* FeedWordPressHTML::tagWithAttributeRegex () */

	function tagWithAttributeMatch ($matches) {
		for ($i = 0; $i <= 21; $i++) :
			if (!isset($matches[$i])) :
				$matches[$i] = '';
			endif;
		endfor;

		$suffix = $matches[16].$matches[13];
		$value = $matches[14].$matches[7];

		return array(
		"full" => $matches[0],
		"tag" => $matches[3],
		"attribute" => $matches[4],
		"value" => $value,
		"quote" => $matches[6],
		"prefix" => $matches[1].$matches[6],
		"suffix" => $matches[6].$suffix,
		"before_attribute" => $matches[2],
		"after_attribute" => $suffix,
		"open_tag" => $matches[1].$matches[6].$value.$matches[6].$suffix,
		"content" => $matches[17],
		"close_tag" => $matches[20],
		);

	} /* FeedWordPressHTML::tagWithAttributeMatch () */
} /* class FeedWordPressHTML */


```
