Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Use the character preceding the variable as a separator
- $separators = array($match[0][0][0]);
- if ($pos !== $len) {
- // Use the character following the variable as the separator when available
- $separators[] = $pattern[$pos];
- }
- $regexp = sprintf('[^%s]+', preg_quote(implode('', array_unique($separators)), self::REGEX_DELIMITER));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement