Q:

Matching a string with exactly two "=" characters on either side

I need a PHP regex to identify patterns like:

== The Quick Brown Fox==

The regex cannot match, however:

=== The Quick Brown Fox===

I have the following regex constructed - I'm so close:
={2}[a-zA-z0-9 ]*={2}

A:

Use lookbehind before and lookahead after like so:
(?<=^|[^=])={2}[a-zA-z0-9 ]*={2}(?=$|[^=])

Edit: Although this solution works, it is not as efficient as Justin's.

