EXPRESSION_REGEXP
EXPRESSION_REGEXP ='/^([A-Za-z_-]+)(?:%s)+$/m'
See class description.
Available matches: $match[0] => Full string $match[1] => Tag $match[2] => Attribute $match[3] => Comparator (can be empty) $match[4] => Value (can be empty)
Find HTML tags by a selector syntax like `div[id="my-id"]`.
$fastHtmlTag :\DevOwl\FastHtmlTag\FastHtmlTag
The current `FastHtmlTag` instance doing the replace.
createMatch(array $m): \DevOwl\FastHtmlTag\finder\match\AbstractMatch|false
See `AbstractRegexFinder`.
array | $m |
Returns false
if no match got found and we cannot process it
createRegexp(array<mixed,string> $searchTags,array<mixed,string> $searchAttributes)
Create regular expression to catch multiple tags and attributes.
Available matches: $match[0] => Full string $match[1] => All content before the link attribute $match[2] => Used tag $match[3] => Used link attribute $match[4] => Used quote for link attribute $match[5] => Link $match[6] => All content after the link
array<mixed,string> | $searchTags | |
array<mixed,string> | $searchAttributes |
setFastHtmlTag(\DevOwl\FastHtmlTag\FastHtmlTag $fastHtmlTag)
Setter.
\DevOwl\FastHtmlTag\FastHtmlTag | $fastHtmlTag |
matchesAttributes(array $values,\DevOwl\FastHtmlTag\finder\match\SelectorSyntaxMatch $match)
Checks if the current attribute and value matches all our defined attributes.
array | $values | |
\DevOwl\FastHtmlTag\finder\match\SelectorSyntaxMatch | $match | If passed selector syntax functions are also executed |
fromExpression(string $expression): \DevOwl\FastHtmlTag\finder\SelectorSyntaxFinder|false
Create an instance from an expression like `div[id="my-id"]`.
string | $expression |
Returns false
if the expression is invalid
applyCallbacks(\DevOwl\FastHtmlTag\finder\match\AbstractMatch|false $match)
Apply registered callbacks to our match.
\DevOwl\FastHtmlTag\finder\match\AbstractMatch|false | $match |
__construct(string $expression,string $tag,array<mixed,\DevOwl\FastHtmlTag\finder\SelectorSyntaxAttribute> $attributes)
C'tor.
string | $expression | |
string | $tag | |
array<mixed,\DevOwl\FastHtmlTag\finder\SelectorSyntaxAttribute> | $attributes | If you rely on the regular expression match of the link attribute it is highly recommend
to pass only one attribute and create multiple instances of |