回答編集履歴

1

PHPコード化

2017/05/11 04:38

投稿

kunai
kunai

スコア5405

test CHANGED
@@ -1,6 +1,6 @@
1
1
  ```PHP
2
2
 
3
- /(<a(\s[^>]*)+href=['|"])/?([^'"]+)(['|"](\s*[^>]*)+>)/i
3
+ preg_replace("/(<a(\s[^>]*)+href=['|\"])\/?([^'\"]+)(['|\"](\s*[^>]*)+>)/i", "$1http://example.com/$3$4", $inputHtml);
4
4
 
5
5
  ```
6
6