Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>how about:</p> <pre><code>preg_match('/\$__this(?:(\'|")\((.+?)\)\1)/', $string); </code></pre> <p><strong>explanation:</strong></p> <pre><code>(?-imsx:\$__this(?:(\'|")\((.+?)\)\1)) matches as follows: NODE EXPLANATION ---------------------------------------------------------------------- (?-imsx: group, but do not capture (case-sensitive) (with ^ and $ matching normally) (with . not matching \n) (matching whitespace and # normally): ---------------------------------------------------------------------- \$ '$' ---------------------------------------------------------------------- __this '__this' ---------------------------------------------------------------------- (?: group, but do not capture: ---------------------------------------------------------------------- ( group and capture to \1: ---------------------------------------------------------------------- \' ''' ---------------------------------------------------------------------- | OR ---------------------------------------------------------------------- " '"' ---------------------------------------------------------------------- ) end of \1 ---------------------------------------------------------------------- \( '(' ---------------------------------------------------------------------- ( group and capture to \2: ---------------------------------------------------------------------- .+? any character except \n (1 or more times (matching the least amount possible)) ---------------------------------------------------------------------- ) end of \2 ---------------------------------------------------------------------- \) ')' ---------------------------------------------------------------------- \1 what was matched by capture \1 ---------------------------------------------------------------------- ) end of grouping ---------------------------------------------------------------------- ) end of grouping ---------------------------------------------------------------------- </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload