-
- $a = 'http://bbs.it-home.org/forum/viewthread.php*';
- $b = str_replace('*', '===x===', $a);
- $c = preg_quote($b);
- $d = str_replace('/', '/', $c);
- $e = '/' . str_replace('===x===', '. ', $d) . '/is';
-
- preg_match($e, 'http://bbs.it-home.org/forum/viewthread.php?tid=12345', $m);
- print_r($m);
- ?>
复制代码
|