PHP regex delimiters, / vs. | vs. {} , what are the differences?
- by powerboy
In the PHP manual of PCRE, http://us.php.net/manual/en/pcre.examples.php, it gives 4 examples of valid patterns:
/<\/\w+/
|(\d{3})-\d+|Sm
/^(?i)php[34]/
{^\s+(\s+)?$}
Seems that / , | or a pair of curly braces can use as delimiters, so is there any difference between them?