$re = '/( # 1: start
( # 2: look for header...
( # 3: start
(ht|f)tps?\: # 4: http or some variant, or
)| # 3: end.
(www) # 5: www.
) # done with header.
(?: # start repeating group
([.\/:?=&-]+) # 6: allowed punctuations
( # 9: start. chose one:
(((\s?)([a-z0-9]+) # a space and lower case chars
)| #or
(\w+) # 11: all word chars, but no spaces
)
) # 9: end.
)+ # end repeating group
) # end capture group 1
(\/?\.?\s?[A-Z]?) # exclude this./mx';
$str = ' us at https://www.roblox.com/support. If anyone asks for your password or personal information (such as your name, address or (https://www.roblox.com/support). If we choose to take action, Devs and Payors agree that our decision (which may include deducting Robux from the Dev and crediting of Robux to the Payor) is final and Devs and Payors shall abide by that decision. You agree to work with us in a timely manner to resolve all such issues, and failure to do so is considered a violation of these Terms.
B. Privacy Policy. At all times your information will be treated in accordance with Appleās Privacy Policy, which is incorporated by reference into this License and can be viewed at: http:// www.apple.com/privacy/.';
$subst = "--------->$1<--------$13";
$result = preg_replace($re, $subst, $str);
echo "The result of the substitution is ".$result;
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for PHP, please visit: http://php.net/manual/en/ref.pcre.php