Advertisement
jargon

Scuff Regex

Sep 29th, 2021
1,355
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.32 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(./site data/art/separators/Green Oil Scuff.png);bgcolor:rgba(0,0,0,0.3);">'.
  8.         '--&gt;${1}&lt;--'.
  9.         '</span>',
  10.            
  11.         $pagedata
  12.     );
  13.        
  14.     return $pagedata;
  15. }
  16.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement