Function __global->array_html_preg_replace
Definitions
sources/comcode_from_html.php
- Do some regular expression matches, locked correctly to single HTML elements. This is necessary to make sure nesting is handled correctly, which regular expressions cannot do on their own.It is case-sensitive for performance reasons. But everyone uses lower case tags for a long time now. Also assumes no tabs within tag definition.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: string
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $element | string | No | No | required parameter | N/A | N/A | The element name to replace over |
| $array | array | No | No | required parameter | N/A | N/A | A list of pairs: Pattern, Replacement |
| $semihtml | string | No | No | required parameter | N/A | N/A | Haystack |
Returns
- Result
- Type: string
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Do some regular expression matches, locked correctly to single HTML elements. This is necessary to make sure nesting is handled correctly, which regular expressions cannot do on their own.It is case-sensitive for performance reasons. But everyone uses lower case tags for a long time now. Also assumes no tabs within tag definition.
*
* @param string $element The element name to replace over
* @param array $array A list of pairs: Pattern, Replacement
* @param string $semihtml Haystack
* @return string Result
*/
function array_html_preg_replace(string $element, array $array, string $semihtml) : string
* Do some regular expression matches, locked correctly to single HTML elements. This is necessary to make sure nesting is handled correctly, which regular expressions cannot do on their own.It is case-sensitive for performance reasons. But everyone uses lower case tags for a long time now. Also assumes no tabs within tag definition.
*
* @param string $element The element name to replace over
* @param array $array A list of pairs: Pattern, Replacement
* @param string $semihtml Haystack
* @return string Result
*/
function array_html_preg_replace(string $element, array $array, string $semihtml) : string

