I needed to complement shortcodes in the string and located the next regex came from here. It really works fine. But i wish to learn how it operates.

Can anybody plz explain me the constituents of the regex and just how it matches the shortcode.

preg_match_all('%(?<=\[shortcode\]).*?(?=\[/shortcode\])%s',$content, $result, PREG_PATTERN_ORDER);

You will find tools to explain regular expressions.

Yours for instance:

NODE                     EXPLANATION
----------------------------------------------------------------------
  (?<=                     look behind to see if there is:
----------------------------------------------------------------------
    \[                       '['
----------------------------------------------------------------------
    shortcode                'shortcode'
----------------------------------------------------------------------
    \]                       ']'
----------------------------------------------------------------------
  )                        end of look-behind
----------------------------------------------------------------------
  .*?                      any character  (0 or more times
                           (matching the least amount possible)
----------------------------------------------------------------------
  (?=                      look ahead to see if there is:
----------------------------------------------------------------------
    \[                       '['
----------------------------------------------------------------------
    /shortcode               '/shortcode'
----------------------------------------------------------------------
    \]                       ']'
----------------------------------------------------------------------
  )                        end of look-ahead
----------------------------------------------------------------------

Find out more concerning the statements on http://www.regular-expressions.info/lookaround.html