As this do not escapes |, you should be careful using a quotemeta'ed string as a valid regexp pattern. I ran into such a hole just now, and ended up using this code:
<?php
$pattern = preg_replace("/\|/", "\\|", quote_meta($pattern);
?>
| ||||||||||||||||
| Copyright © 2001-2005 The PHP Group All rights reserved. |
This unofficial mirror is operated at:
The Server Pages Last updated: Thu May 19 17:35:34 2005 CDT |