[ create a new paste ] login | about

Link: http://codepad.org/S2oSb66r    [ raw code | output | fork ]

PHP, pasted on Jun 8:
1
2
3
4
5
6
7
<?php

  echo "/<\s*?img\s[^>]*?src=([\"']??)([^\"' >]*?)\1[^>]*?>/si";
  echo  "\n                                       ^^ Oh no! Where did my back reference go?\n\n";

  echo '/<\s*?img\s[^>]*?src=(["\']??)([^"\' >]*?)\1[^>]*?>/si';
  echo "\n                                        ^^ Ah, there it is!";


Output:
1
2
3
4
5
/<\s*?img\s[^>]*?src=(["']??)([^"' >]*?)[^>]*?>/si
                                       ^^ Oh no! Where did my back reference go?

/<\s*?img\s[^>]*?src=(["']??)([^"' >]*?)\1[^>]*?>/si
                                        ^^ Ah, there it is!


Create a new paste based on this one


Comments: