Advertisement
jargon

Scuff Regex

Sep 29th, 2021
1,340
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.31 KB | None | 0 0
  1. function inject_separators( $pagedata = '' )
  2. {
  3.     $pagedata =
  4.     preg_replace(
  5.         '/=== (?<scuff>[\w\h\p{P}\p{Sm}]*) ===/m',
  6.        
  7.         '<span style="background-image:url({{path.image}}site data/art/separators/Green Oil Scuff.png);">'.
  8.         '--&gt;($scuff)&lt;--'.
  9.         '</span>',
  10.            
  11.         $pagedata
  12.     );
  13.        
  14.     return $pagedata;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement