Advertisement
Guest User

Untitled

a guest
Feb 21st, 2019
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. // Use the character preceding the variable as a separator
  2. $separators = array($match[0][0][0]);
  3.  
  4. if ($pos !== $len) {
  5. // Use the character following the variable as the separator when available
  6. $separators[] = $pattern[$pos];
  7. }
  8. $regexp = sprintf('[^%s]+', preg_quote(implode('', array_unique($separators)), self::REGEX_DELIMITER));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement