PHP Manual
Function Reference
Text Processing
PCRE
Introduction
Installing/Configuring
Predefined Constants
Examples
PCRE Patterns
PCRE Functions
Predefined Constants
PCRE Patterns
PCRE
PHP Manual
Examples
Example #1 Examples of valid patterns
/<\/\w+>/
|(\d{3})-\d+|Sm
/^(?i)php[34]/
{^\s+(\s+)?$}
Example #2 Examples of invalid patterns
/href='(.*)'
- missing ending delimiter
/\w+\s*\w+/J
- unknown modifier 'J'
1-\d3-\d3-\d4|
- missing starting delimiter