A regular expression is a pattern that is compared against a given string from left to right.
PCRE standard
Delimiters
When using any PCRE function, the pattern must be enclosed in delimiters. A delimiter can be any character that is not a letter, digit, backslash, or whitespace.
Commonly used delimiters are forward slashes (/), hash signs (#), and tildes (~). Below are examples of patterns with valid delimiters.
/foo bar/
#^[^0-9]$#
+php+
%[a-zA-Z0-9_-]%
You can also use bracket-style delimiters, where the opening and closing delimiters are a matching pair of brackets. (), {}, [], and <> are valid delimiter pairs.
(this [is] a (pattern))
{this [is] a (pattern)}
[this [is] a (pattern)]
<this [is] a (pattern)>
Bracket-style delimiters do not need to be escaped when they are also used as metacharacters inside the pattern. Like other delimiters, however, they must be escaped when used as literal characters.
If you need to use the delimiter inside the pattern, escape it with a backslash. If the delimiter appears often in the pattern, it is better for readability to choose a different delimiter.
/http:\/\//
#http://#
My preferred delimiter:
preg_match("{<br /><b>Posted On</b>: (.+)<}", $description, $matches);
Testing
Use the open_in_new regex101.com service.
Andrew Dorokhov