Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $text = '
- first line without links
- <a title="bla-bla" href="http://ya.ru/">second string linelink </a>
- third line';
- $pattern = '/^(?>(?!(\<a.*href)|\<\/a).)*$/umi';
- $result = preg_match_all($pattern, $text, $matches);
- print_r($matches);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement